diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-11-02 16:45:22 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-11-02 16:45:22 +0000 |
commit | c12b963ede4ecd36859344cfa5830c1426a7700e (patch) | |
tree | 01f6075b31445858757848dbaa5cbb7f22051294 /usr.bin/rcs/rcsnum.c | |
parent | 668039031ddbfe6ffa2120b2ff6854a69293099c (diff) |
Allow rcsnum_free and buf_free to accept NULL and remove various NULL
checks that are now unnecessary, from Michael W Bombardieri. ok millert
Diffstat (limited to 'usr.bin/rcs/rcsnum.c')
-rw-r--r-- | usr.bin/rcs/rcsnum.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/rcs/rcsnum.c b/usr.bin/rcs/rcsnum.c index 69431dabf53..99c0630a86a 100644 --- a/usr.bin/rcs/rcsnum.c +++ b/usr.bin/rcs/rcsnum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsnum.c,v 1.17 2015/06/13 20:15:21 nicm Exp $ */ +/* $OpenBSD: rcsnum.c,v 1.18 2015/11/02 16:45:21 nicm Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -105,6 +105,8 @@ rcsnum_parse(const char *str) void rcsnum_free(RCSNUM *rn) { + if (rn == NULL) + return; free(rn->rn_id); free(rn); } |