]> 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 3c768d3be4d5f315d3f6ce5291a3d19f172bd2a4..6fdf9eb994949b7a5bd9047d9c605cc0542ad7b5 100644 (file)
@@ -1079,6 +1079,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;
                                }
                        }