mirror of
https://github.com/samba-team/samba.git
synced 2025-12-05 12:23:50 +03:00
s3: Fix Coverity ID 2325, RESOURCE_LEAK
This commit is contained in:
@@ -518,6 +518,10 @@ SMBC_opendir_ctx(SMBCCTX *context,
|
||||
ip_list = (struct ip_service *)memdup(
|
||||
&server_addr, sizeof(server_addr));
|
||||
if (ip_list == NULL) {
|
||||
if (dir) {
|
||||
SAFE_FREE(dir->fname);
|
||||
SAFE_FREE(dir);
|
||||
}
|
||||
TALLOC_FREE(frame);
|
||||
errno = ENOMEM;
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user