cpphash: Fix not to access freed pointer.
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Tue, 6 Dec 2016 05:42:37 +0000 (14:42 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 2 Jan 2017 07:23:58 +0000 (16:23 +0900)
Change-Id: I32220740355e9397f5a880a7d0de884c18de066e

src/bin/edje/epp/cpphash.c

index 80972ea..ac643e6 100644 (file)
@@ -192,7 +192,7 @@ cpp_hash_cleanup(cpp_reader * pfile EINA_UNUSED)
 
    for (i = HASHSIZE; --i >= 0;)
      {
-       while (hashtab[i])
-          delete_macro(hashtab[i]);
+        if (hashtab[i])
+          delete_macro(hashtab[i]);
      }
 }