mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-08 07:48:03 +02:00
[script] Fix minor memory leaks
This commit is contained in:
parent
f0ca590f14
commit
9b941402fb
2 changed files with 2 additions and 0 deletions
|
|
@ -51,6 +51,7 @@ static script_return image_new (script_state* state, void* user_data)
|
|||
reply = script_obj_new_native (image, data->class);
|
||||
}
|
||||
else {
|
||||
ply_image_free (image);
|
||||
reply = script_obj_new_null ();
|
||||
}
|
||||
free(filename);
|
||||
|
|
|
|||
|
|
@ -576,6 +576,7 @@ script_obj* script_obj_plus (script_obj* script_obj_a, script_obj* script_obj_b)
|
|||
char* newstring;
|
||||
asprintf(&newstring, "%s%s", string_a, string_b);
|
||||
obj = script_obj_new_string (newstring);
|
||||
free(newstring);
|
||||
}
|
||||
else {
|
||||
obj = script_obj_new_null ();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue