mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3:lib: Fix use_after_free: Using freed pointer "p"
Found by covscan. Signed-off-by: Pavel Filipenský <pfilipen@redhat.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
d19dfe1efb
commit
3bb6b05781
@ -140,6 +140,7 @@ char *netapi_read_file(const char *filename, uint32_t *psize)
|
||||
tmp = realloc(p, sizeof(char) * newbufsize);
|
||||
if (tmp == NULL) {
|
||||
free(p);
|
||||
p = NULL;
|
||||
goto fail;
|
||||
}
|
||||
p = tmp;
|
||||
|
Loading…
Reference in New Issue
Block a user