1
0
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:
Pavel Filipenský 2022-05-23 12:57:42 +02:00 committed by Jeremy Allison
parent d19dfe1efb
commit 3bb6b05781

View File

@ -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;