libjail: avoid a double-free in the MAC label bits
As written, we'll repeatedly jps_free() the first element, which is
obviously bogus. Fix it to index appropriately.
Fixes: db3b39f063 ("libjail: extend struct handlers [...]")
This commit is contained in:
+1
-1
@@ -978,7 +978,7 @@ jailparam_free(struct jailparam *jp, unsigned njp)
|
||||
for (j = 0; j < njp; j++) {
|
||||
free(jp[j].jp_name);
|
||||
if (!(jp[j].jp_flags & JP_RAWVALUE)) {
|
||||
jps_free(jp);
|
||||
jps_free(&jp[j]);
|
||||
free(jp[j].jp_value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user