diff options
Diffstat (limited to 'libical/src/libicalss')
-rw-r--r-- | libical/src/libicalss/icalcluster.c | 1 | ||||
-rw-r--r-- | libical/src/libicalss/icalstore.c | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/libical/src/libicalss/icalcluster.c b/libical/src/libicalss/icalcluster.c index 00e7ef0365..c0160cc6c3 100644 --- a/libical/src/libicalss/icalcluster.c +++ b/libical/src/libicalss/icalcluster.c @@ -67,7 +67,6 @@ icalerrorenum icalcluster_create_cluster(char *path) f = fopen(path,"w"); if (f == 0){ - fclose(f); icalerror_set_errno(ICAL_FILE_ERROR); return ICAL_FILE_ERROR; } 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; |