From 97dec036095480b3ebaf56028f549d4cd694c403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Mon, 22 Aug 2022 21:17:52 +0800 Subject: Array setter doesn't free --- pikul.i | 2 -- 1 file changed, 2 deletions(-) (limited to 'pikul.i') diff --git a/pikul.i b/pikul.i index c045603..bc7a1b4 100644 --- a/pikul.i +++ b/pikul.i @@ -8,8 +8,6 @@ char *provisions[3]; void provisions_set(int i, char *val) { - if (provisions[i]) - free(provisions[i]); provisions[i] = (char *)malloc(strlen(val) + 1); strcpy(provisions[i], val); } -- cgit v1.2.3