]> granicus.if.org Git - python/commitdiff
Fix memory leak.
authorMartin v. Löwis <martin@v.loewis.de>
Mon, 15 May 2006 05:51:36 +0000 (05:51 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Mon, 15 May 2006 05:51:36 +0000 (05:51 +0000)
Modules/posixmodule.c

index f77832dbe693f43f2af96720a822c601df4ff153..03fae255c3252d3a15d33fa58652d6bf5d9ab0cb 100644 (file)
@@ -1855,6 +1855,7 @@ posix_listdir(PyObject *self, PyObject *args)
                                free(wnamebuf);
                                return NULL;
                        }
+                       free(wnamebuf);
                        return d;
                }
                /* Drop the argument parsing error as narrow strings