HomeFreeBSD

rpcgen: Don't free() a pointer after realloc().

Description

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)

Details

Provenance
jhbAuthored on Dec 5 2022, 12:31 AM
Reviewer
brooks
Differential Revision
D37540: rpcgen: Don't free() a pointer after realloc().
Parents
rG7b9e74754674: libsa: Disable -Wdangling-pointer for zfs.c.
Branches
Unknown
Tags
Unknown