mirror of
https://github.com/samba-team/samba.git
synced 2025-11-23 20:23:50 +03:00
r16582: Fix Klocwork #1997 and all generic class of problems
where we don't correctly check the return from memdup. Jeremy.
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
6967fd4cef
commit
ce14daf51c
@@ -848,6 +848,12 @@ BOOL cli_qfileinfo_test(struct cli_state *cli, int fnum, int level, char **poutd
|
||||
}
|
||||
|
||||
*poutdata = memdup(rdata, data_len);
|
||||
if (!*poutdata) {
|
||||
SAFE_FREE(rdata);
|
||||
SAFE_FREE(rparam);
|
||||
return False;
|
||||
}
|
||||
|
||||
*poutlen = data_len;
|
||||
|
||||
SAFE_FREE(rdata);
|
||||
|
||||
Reference in New Issue
Block a user