From 6a6c49516a1cdce7302180be0f67cf7711a09b19 Mon Sep 17 00:00:00 2001 From: h_vogt Date: Sat, 1 Dec 2012 13:24:46 +0100 Subject: [PATCH] inpcom.c: remove memory leak --- src/frontend/inpcom.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 18f52a349..351412a90 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -3407,7 +3407,9 @@ get_number_terminals(char *c) i = j = 0; /* find the last token in the line*/ while ((i < 100) && (*c != '\0')) { - strncpy(nam_buf, gettok_instance(&c), 32); + char *tmp_inst = gettok_instance(&c); + strncpy(nam_buf, tmp_inst, 32); + tfree(tmp_inst); if (strchr(nam_buf, '=')) j++; i++;