summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Karl Ramm <kcr@1ts.org>2010-08-22 00:56:15 +0000
committerGravatar Karl Ramm <kcr@1ts.org>2010-08-22 00:56:15 +0000
commit5e5001904aaf810f2ae395959f8e5407f9b89b16 (patch)
tree8e8ff62ffa4c56d402f121eb76f793abb513ba61
parent45a5927fc4d7e6cefdf6cbd46e186931ba4bf42b (diff)
Fix a leak if ZNewFormatSmallRawNotice fails. (thanks to nelhage@mit.edu for noticing)
-rw-r--r--server/server.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/server/server.c b/server/server.c
index b3b5911..37eaa3e 100644
--- a/server/server.c
+++ b/server/server.c
@@ -1243,6 +1243,7 @@ server_forward(ZNotice_t *notice,
retval = ZNewFormatSmallRawNotice(notice, pack, &packlen);
if (retval != ZERR_NONE) {
syslog(LOG_WARNING, "srv_fwd format: %s", error_message(retval));
+ free(pack);
continue;
}
if (otherservers[i].dumping) {