Message ID | 20230814132025.45364-24-cgzones@googlemail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 168edd1ca279 |
Delegated to: | Petr Lautrbach |
Headers | show |
Series | libselinux: rework selabel_file(5) database | expand |
On Mon, Aug 14, 2023 at 9:42 AM Christian Göttsche <cgzones@googlemail.com> wrote: > > 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> > --- > v2: add patch > --- > libselinux/src/label_file.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/libselinux/src/label_file.h b/libselinux/src/label_file.h > index 56439e2d..3827b5c0 100644 > --- a/libselinux/src/label_file.h > +++ b/libselinux/src/label_file.h > @@ -446,6 +446,9 @@ static inline int process_line(struct selabel_handle *rec, > "%s: line %u error due to: %m\n", path, > lineno); > } > + free(regex); > + free(type); > + free(context); > return -1; > } > > -- > 2.40.1 >
On Wed, Oct 11, 2023 at 2:50 PM James Carter <jwcart2@gmail.com> wrote: > > On Mon, Aug 14, 2023 at 9:42 AM Christian Göttsche > <cgzones@googlemail.com> wrote: > > > > 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> > Merged. Thanks, Jim > > --- > > v2: add patch > > --- > > libselinux/src/label_file.h | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/libselinux/src/label_file.h b/libselinux/src/label_file.h > > index 56439e2d..3827b5c0 100644 > > --- a/libselinux/src/label_file.h > > +++ b/libselinux/src/label_file.h > > @@ -446,6 +446,9 @@ static inline int process_line(struct selabel_handle *rec, > > "%s: line %u error due to: %m\n", path, > > lineno); > > } > > + free(regex); > > + free(type); > > + free(context); > > return -1; > > } > > > > -- > > 2.40.1 > >
diff --git a/libselinux/src/label_file.h b/libselinux/src/label_file.h index 56439e2d..3827b5c0 100644 --- a/libselinux/src/label_file.h +++ b/libselinux/src/label_file.h @@ -446,6 +446,9 @@ static inline int process_line(struct selabel_handle *rec, "%s: line %u error due to: %m\n", path, lineno); } + free(regex); + free(type); + free(context); return -1; }
Some entries might have been already parsed and allocated. Signed-off-by: Christian Göttsche <cgzones@googlemail.com> --- v2: add patch --- libselinux/src/label_file.h | 3 +++ 1 file changed, 3 insertions(+)