mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
Fix memory leaks on error path
This commit is contained in:
parent
f7d2f69299
commit
47dd0700b4
@ -38,8 +38,15 @@ static bool cli_link_internal(struct cli_state *cli, const char *oldname, const
|
||||
size_t newlen = 2*(strlen(newname)+1);
|
||||
|
||||
param = SMB_MALLOC_ARRAY(char, 6+newlen+2);
|
||||
|
||||
if (!param) {
|
||||
return false;
|
||||
}
|
||||
|
||||
data = SMB_MALLOC_ARRAY(char, oldlen+2);
|
||||
if (!param || !data) {
|
||||
|
||||
if (!data) {
|
||||
SAFE_FREE(param);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user