diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2012-10-20 09:05:34 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2012-10-20 09:05:34 +0000 |
commit | 8684d6c8e5ed42ac1ba51215977c465b468300e1 (patch) | |
tree | 8cf374a4b66e6795bf77e8cb79be13699fec1d70 /usr.bin | |
parent | 83368933c0e13385e80f97efe7adc16f5bbce3de (diff) |
- fix a potential double free
ok florian@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mg/tags.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/mg/tags.c b/usr.bin/mg/tags.c index 92d1425e79e..bfa1ee33077 100644 --- a/usr.bin/mg/tags.c +++ b/usr.bin/mg/tags.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tags.c,v 1.5 2012/07/02 08:08:31 lum Exp $ */ +/* $OpenBSD: tags.c,v 1.6 2012/10/20 09:05:33 jasper Exp $ */ /* * This file is in the public domain. @@ -228,6 +228,7 @@ pushtag(char *tok) } if ((s->bname = strdup(bname)) == NULL) { ewprintf("Out of memory"); + free(s); return (FALSE); } s->doto = doto; |