summaryrefslogtreecommitdiff
path: root/src/label_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/label_file.c')
-rw-r--r--src/label_file.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/label_file.c b/src/label_file.c
index b75c02a..9d0a54c 100644
--- a/src/label_file.c
+++ b/src/label_file.c
@@ -492,6 +492,8 @@ out:
return rc;
}
+static void closef(struct selabel_handle *rec);
+
static int init(struct selabel_handle *rec, const struct selinux_opt *opts,
unsigned n)
{
@@ -543,7 +545,8 @@ static int init(struct selabel_handle *rec, const struct selinux_opt *opts,
finish:
if (status)
- free(data->spec_arr);
+ closef(rec);
+
return status;
}