iface-modem-firmware: Initialize context to null
Without setting memory to NULL it is possible that ctx->list point to an unitialized pointer and trig a segfault when we free it (for example when the firmware list is not supported) Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
This commit is contained in:
@@ -160,7 +160,7 @@ handle_list (MmGdbusModemFirmware *skeleton,
|
||||
{
|
||||
HandleListContext *ctx;
|
||||
|
||||
ctx = g_slice_new (HandleListContext);
|
||||
ctx = g_slice_new0 (HandleListContext);
|
||||
ctx->skeleton = g_object_ref (skeleton);
|
||||
ctx->invocation = g_object_ref (invocation);
|
||||
ctx->self = g_object_ref (self);
|
||||
|
Reference in New Issue
Block a user