]> granicus.if.org Git - php/commitdiff
- Fix possible memory leak
authorJohannes Schlüter <johannes@php.net>
Mon, 16 May 2011 19:46:32 +0000 (19:46 +0000)
committerJohannes Schlüter <johannes@php.net>
Mon, 16 May 2011 19:46:32 +0000 (19:46 +0000)
# Found by parfait - http://labs.oracle.com/projects/parfait/

TSRM/tsrm_virtual_cwd.c

index d533245c612d266bc3b6924d975c1eb171e76cbc..b88bae90a83ccfa53c2ab11ffde678c678de9681 100644 (file)
@@ -1067,6 +1067,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
                                }
                                if (is_dir && !directory) {
                                        /* not a directory */
+                                       tsrm_free_alloca(tmp, use_heap);
                                        return -1;
                                }
                        }