diff options
author | David Benjamin <davidben@mit.edu> | 2013-04-03 12:29:24 -0400 |
---|---|---|
committer | Karl Ramm <kcr@1ts.org> | 2013-08-08 00:24:58 -0400 |
commit | 15dad3f19e3aa1bfb85ffabcca2a093f458399de (patch) | |
tree | 257edfd6515a6b4157e42207c75d55d82558ff65 | |
parent | f46f856dea1b60ad4a2e28856bfcd28d9a4c3fb8 (diff) |
ZSendNotice: Don't leak buffer in error case
I would hope this codepath can never trigger, but good to clean up properly
here.
-rw-r--r-- | lib/ZSendNot.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ZSendNot.c b/lib/ZSendNot.c index becb05b..4fc246d 100644 --- a/lib/ZSendNot.c +++ b/lib/ZSendNot.c @@ -38,8 +38,11 @@ ZSrvSendNotice(ZNotice_t *notice, cert_routine)) != ZERR_NONE) return (retval); - if ((retval = ZParseNotice(buffer, len, &newnotice)) != ZERR_NONE) + if ((retval = ZParseNotice(buffer, len, &newnotice)) != ZERR_NONE) { + free(buffer); return (retval); + } + retval = Z_SendFragmentedNotice(&newnotice, len, cert_routine, send_routine); |