diff options
author | 2003-09-25 20:06:16 +0000 | |
---|---|---|
committer | 2003-09-25 20:06:16 +0000 | |
commit | 2a443c00a464266cf41601748df1c721f37b771a (patch) | |
tree | 301428e02a2139e6de50ea5d38ea385c7069060e /gnu/usr.bin/cvs/src | |
parent | Return immediately if argument to BN_sub_word is zero. (diff) | |
download | wireguard-openbsd-2a443c00a464266cf41601748df1c721f37b771a.tar.xz wireguard-openbsd-2a443c00a464266cf41601748df1c721f37b771a.zip |
Free buffer and set it to NULL on error lest it be used.
Fixes a crash when MALLOC_OPTIONS includes 'J' found by david@.
Diffstat (limited to 'gnu/usr.bin/cvs/src')
-rw-r--r-- | gnu/usr.bin/cvs/src/rcs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gnu/usr.bin/cvs/src/rcs.c b/gnu/usr.bin/cvs/src/rcs.c index 6fd2aacd005..ac060e26e2f 100644 --- a/gnu/usr.bin/cvs/src/rcs.c +++ b/gnu/usr.bin/cvs/src/rcs.c @@ -8427,6 +8427,11 @@ make_file_label (path, rev, rcs) (void) tm_to_internet (datebuf, wm); (void) sprintf (label, "-L%s\t%s", path, datebuf); } + else + { + free(label); + label = NULL; + } } return label; } |