diff options
-rw-r--r-- | source3/libsmb/libsmb_dir.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/libsmb/libsmb_dir.c b/source3/libsmb/libsmb_dir.c index 9f249a9a1d..13efc895c4 100644 --- a/source3/libsmb/libsmb_dir.c +++ b/source3/libsmb/libsmb_dir.c @@ -550,6 +550,10 @@ SMBC_opendir_ctx(SMBCCTX *context, cli_shutdown(cli); if (!workgroup || !server) { + if (dir) { + SAFE_FREE(dir->fname); + SAFE_FREE(dir); + } errno = ENOMEM; TALLOC_FREE(frame); return NULL; |