mirror of
https://github.com/SELinuxProject/selinux
synced 2025-05-07 18:18:01 +00:00
libselinux: free elements on read_spec_entries() failure
Some entries might have been already parsed and allocated. Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
parent
dcb8e1bfbb
commit
168edd1ca2
@ -446,6 +446,9 @@ static inline int process_line(struct selabel_handle *rec,
|
|||||||
"%s: line %u error due to: %m\n", path,
|
"%s: line %u error due to: %m\n", path,
|
||||||
lineno);
|
lineno);
|
||||||
}
|
}
|
||||||
|
free(regex);
|
||||||
|
free(type);
|
||||||
|
free(context);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user