Free buffer in case of unknown error - avoids memory leak

This commit is contained in:
Paulo Matos 2019-02-13 09:02:32 +01:00 committed by Matthew Flatt
parent 4014b066d1
commit 14499aa822

View File

@ -629,8 +629,10 @@ char *rktio_get_current_directory(rktio_t *rktio)
} else
break;
}
if (!r)
if (!r) {
free(s);
get_posix_error();
}
return r;
#endif
}