]> granicus.if.org Git - php/commitdiff
Fix memory leak
authorAnatol Belski <ab@php.net>
Sat, 30 Mar 2019 20:27:37 +0000 (21:27 +0100)
committerAnatol Belski <ab@php.net>
Sat, 30 Mar 2019 20:28:51 +0000 (21:28 +0100)
win32/readdir.c

index 0d46f14a77a98a12c21239381ce7b4a57e056836..9071a61b107c212ee3318269f6ede77bfbc35299 100644 (file)
@@ -68,6 +68,7 @@ DIR *opendir(const char *dir)
 
        dp = (DIR *) calloc(1, sizeof(DIR) + (_MAX_FNAME*5+1)*sizeof(char));
        if (dp == NULL) {
+               free(filespecw);
                free(resolvedw);
                return NULL;
        }