Avoid memory leak when failing to read file metadata
This commit is contained in:
parent
3dcffed682
commit
a067dfbb2c
|
@ -504,6 +504,7 @@ static bool file_metadata(char *pathname, pts_file_metadata_t **entry)
|
||||||
if (stat(pathname, &st))
|
if (stat(pathname, &st))
|
||||||
{
|
{
|
||||||
DBG1(DBG_PTS, "unable to obtain statistics about '%s'", pathname);
|
DBG1(DBG_PTS, "unable to obtain statistics about '%s'", pathname);
|
||||||
|
free(this);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue