mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-07 01:50:18 +01:00
Fix memory leak in protect_argv() in case of memory shortage
This commit is contained in:
parent
b9a7744310
commit
4e4d932fd9
1 changed files with 4 additions and 2 deletions
|
|
@ -417,8 +417,10 @@ protect_argv (char * const *argv,
|
|||
q = args[i] = dbus_malloc (len + need_dblquotes*2 + 1);
|
||||
|
||||
if (q == NULL)
|
||||
return -1;
|
||||
|
||||
{
|
||||
dbus_free_string_array (args);
|
||||
return -1;
|
||||
}
|
||||
|
||||
p = argv[i];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue