From: Jonathan McDowell Date: Tue, 22 Jul 2014 11:53:40 +0000 (+0100) Subject: Fix keyd memory leak on error reading client provided search text X-Git-Tag: onak-0.4.3~11 X-Git-Url: https://the.earth.li/gitweb/?a=commitdiff_plain;h=ff3b87253171dc8b76ec26b70ba738a2d3a603ac;p=onak.git Fix keyd memory leak on error reading client provided search text --- diff --git a/keyd.c b/keyd.c index 2784257..18e9ddc 100644 --- a/keyd.c +++ b/keyd.c @@ -344,6 +344,7 @@ static int sock_do(struct onak_dbctx *dbctx, int fd) bytes = read(fd, search, count); if (bytes != count) { ret = 1; + free(search); break; } search[count] = 0;