diff options
Diffstat (limited to 'libical/src/libicalss/icalstore.c')
-rw-r--r-- | libical/src/libicalss/icalstore.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libical/src/libicalss/icalstore.c b/libical/src/libicalss/icalstore.c index 014c9ed19b..5d1546f3b2 100644 --- a/libical/src/libicalss/icalstore.c +++ b/libical/src/libicalss/icalstore.c @@ -206,11 +206,13 @@ void icalstore_free(icalstore* s) icalcluster_free(impl->cluster); } - while( (str=pvl_pop(impl->directory)) != 0){ + while(impl->directory !=0 && (str=pvl_pop(impl->directory)) != 0){ free(str); } - pvl_free(impl->directory); + if(impl->directory != 0){ + pvl_free(impl->directory); + } impl->directory = 0; impl->directory_iterator = 0; |