fix a slight memory leak
authorRudolf Polzer <divverent@xonotic.org>
Sun, 5 Jun 2011 17:37:50 +0000 (19:37 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 5 Jun 2011 17:37:50 +0000 (19:37 +0200)
tools/quake3/q3map2/patch.c

index 9cd707e..b977dc7 100644 (file)
@@ -266,8 +266,10 @@ void ParsePatch( qboolean onlyLights )
        GetToken(qtrue);
        if (g_bBrushPrimit!=BPRIMIT_OLDBRUSHES && strcmp(token,"}"))
        {
-               // NOTE: we leak that!
                ep = ParseEPair();
+               free(ep->key);
+               free(ep->value);
+               free(ep);
        }
        else
                UnGetToken();