diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-09-25 20:06:17 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-09-25 20:06:17 +0000 |
commit | 08902e0496722d74da35dc74b541ab53c5c0e689 (patch) | |
tree | ca2847e9337b2c9328322b3b50b95fc67026db5c /gnu | |
parent | b2ada990e5f93d5c2514e8bda5b45d16eb58f136 (diff) |
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')
-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; } |