git: a7b1263ef066 - stable/13 - rpcgen: Don't free() a pointer after realloc().
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 03 May 2023 00:29:32 UTC
The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a7b1263ef066bf149fa9bef9e4fdac5cc1446964 commit a7b1263ef066bf149fa9bef9e4fdac5cc1446964 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-12-05 00:31:35 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2023-05-03 00:03:11 +0000 rpcgen: Don't free() a pointer after realloc(). A successful realloc() already frees the old pointer. Reported by: GCC -Wuse-after-free Reviewed by: brooks, imp, emaste Differential Revision: https://reviews.freebsd.org/D37540 (cherry picked from commit f0b58b190107416e813c5db875034c6cfcede523) --- usr.bin/rpcgen/rpc_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.bin/rpcgen/rpc_main.c b/usr.bin/rpcgen/rpc_main.c index 698017c969f2..1a2cae928472 100644 --- a/usr.bin/rpcgen/rpc_main.c +++ b/usr.bin/rpcgen/rpc_main.c @@ -925,7 +925,6 @@ moreargs(void) warnx("unable to allocate arglist"); crash(); } - free(arglist); arglist = newarglist; }