Change-Id: Ife6538b1f72d601da93bff83d361c6d10a02bc0e
Signed-off-by: Radoslaw Pajak <r.pajak@samsung.com>
if(id == 0)
size += strlen(name) + 1;
- cmd = malloc(size);
+ cmd = alloca(size);
if (!cmd)
{
_dbus_verbose("Error allocating memory for: %s,%s\n", _dbus_strerror (errno), _dbus_error_from_errno (errno));
if(errno == EINTR)
goto again;
pInfo->uniqueId = 0;
+ return -errno;
}
else
{
if(errno == EINTR)
goto again2;
_dbus_verbose("kdbus error freeing pool: %d (%m)\n", errno);
- return -1;
+ return -errno;
}
}
- free(cmd);
return ret;
}
_dbus_verbose("Unique name discovered:%s\n", owner);
}
else if((ret != -ENOENT) && (ret != -ENXIO))
- _dbus_verbose("kdbus error sending name query: err %d (%m)\n", errno);
+ _dbus_verbose("kdbus error sending name query: err %d (%m)\n", ret);
return ret;
}