1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00

Memory leak fixes from insure.

(This used to be commit 03b1cab9a8)
This commit is contained in:
Tim Potter 2001-05-15 01:55:29 +00:00
parent b10ae68700
commit b343f082e4
2 changed files with 5 additions and 10 deletions

View File

@ -42,6 +42,8 @@ BOOL wb_lsa_open_policy(char *server, BOOL sec_qos, uint32 des_access,
pol->cli = (struct cli_state *)malloc(sizeof(struct cli_state));
pol->mem_ctx = talloc_init();
ZERO_STRUCTP(pol->cli);
if (!pol->cli || !pol->mem_ctx)
return False;
@ -183,6 +185,9 @@ BOOL wb_samr_connect(char *server, uint32 access_mask, CLI_POLICY_HND *pol)
ZERO_STRUCTP(pol);
pol->cli = (struct cli_state *)malloc(sizeof(struct cli_state));
ZERO_STRUCTP(pol->cli);
pol->mem_ctx = talloc_init();
if (!pol->cli || !pol->mem_ctx)

View File

@ -530,11 +530,6 @@ BOOL winbindd_lookup_sid_by_name(char *name, DOM_SID *sid,
}
}
/* Free memory */
if (types != NULL) free(types);
if (sids != NULL) free(sids);
return res;
}
@ -570,11 +565,6 @@ BOOL winbindd_lookup_name_by_sid(DOM_SID *sid, fstring name,
}
}
/* Free memory */
safe_free(types);
free_char_array(num_names, names);
return res;
}