From: Sebastian Harl Date: Fri, 13 Dec 2013 13:36:38 +0000 (+0100) Subject: sysdb: Free memory allocated by readline(). X-Git-Tag: sysdb-0.1.0~300^2~10 X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=commitdiff_plain;h=3bca9aa00f62d21a2330f4b656b9772903381890 sysdb: Free memory allocated by readline(). --- diff --git a/src/client/sysdb.c b/src/client/sysdb.c index 66790cd..aa79138 100644 --- a/src/client/sysdb.c +++ b/src/client/sysdb.c @@ -240,11 +240,15 @@ main(int argc, char **argv) if (! line) break; - if (*line == '\0') + if (*line == '\0') { + free(line); continue; + } if (*line != ' ') add_history(line); + + free(line); } if (hist_file[0] != '\0') {