aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-12-05 00:31:35 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2022-12-05 00:31:35 +0000
commitf0b58b190107416e813c5db875034c6cfcede523 (patch)
treee7bf020c21687049cae65ef0f90916b43414b173
parent8dd8d56d95763ffc914bb729eb27d720cd8ab5eb (diff)
downloadsrc-f0b58b190107416e813c5db875034c6cfcede523.tar.gz
src-f0b58b190107416e813c5db875034c6cfcede523.zip
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
-rw-r--r--usr.bin/rpcgen/rpc_main.c1
1 files changed, 0 insertions, 1 deletions
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;
}