diff options
author | mike <mike@FreeBSD.org> | 2002-09-01 01:49:27 +0000 |
---|---|---|
committer | mike <mike@FreeBSD.org> | 2002-09-01 01:49:27 +0000 |
commit | 02b206400ef68a3d8b50aafd238f36ed52bf171d (patch) | |
tree | 587c56432c5c54a6f7205560a0faba035fdd2d79 /lib/libc/gen/fmtmsg.c | |
parent | 6840044b4e1ceb6c45236c4eed4db70d431d2b7c (diff) | |
download | FreeBSD-src-02b206400ef68a3d8b50aafd238f36ed52bf171d.zip FreeBSD-src-02b206400ef68a3d8b50aafd238f36ed52bf171d.tar.gz |
Fix a memory leak.
Diffstat (limited to 'lib/libc/gen/fmtmsg.c')
-rw-r--r-- | lib/libc/gen/fmtmsg.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/gen/fmtmsg.c b/lib/libc/gen/fmtmsg.c index e70a83b..6caabbb 100644 --- a/lib/libc/gen/fmtmsg.c +++ b/lib/libc/gen/fmtmsg.c @@ -72,8 +72,10 @@ def: } output = printfmt(msgverb, class, label, sev, text, action, tag); - if (output == NULL) + if (output == NULL) { + free(msgverb); return (MM_NOTOK); + } if (*output != '\0') fprintf(stderr, "%s", output); free(msgverb); |