diff options
Diffstat (limited to 'source/smbwrapper/smbw_dir.c')
-rw-r--r-- | source/smbwrapper/smbw_dir.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/smbwrapper/smbw_dir.c b/source/smbwrapper/smbw_dir.c index a1069c535e6..a056a2ae752 100644 --- a/source/smbwrapper/smbw_dir.c +++ b/source/smbwrapper/smbw_dir.c @@ -63,12 +63,10 @@ free a smbw_dir structure and all entries *******************************************************/ static void free_dir(struct smbw_dir *dir) { - if (dir->list) { - free(dir->list); - } - if (dir->path) free(dir->path); + SAFE_FREE(dir->list); + SAFE_FREE(dir->path); ZERO_STRUCTP(dir); - free(dir); + SAFE_FREE(dir); } |