daemon: fix use of NULL pointers in logs

This commit is contained in:
Nedko Arnaudov 2010-05-09 12:10:19 +03:00
parent 15d08a2e92
commit dd086a0b72
2 changed files with 4 additions and 4 deletions

View File

@ -182,7 +182,7 @@ bool ladish_command_change_app_state(void * call_ptr, struct ladish_cqueue * que
opath_dup = strdup(opath);
if (opath_dup == NULL)
{
lash_dbus_error(call_ptr, LASH_DBUS_ERROR_GENERIC, "strdup('%s') failed.", opath_dup);
lash_dbus_error(call_ptr, LASH_DBUS_ERROR_GENERIC, "strdup('%s') failed.", opath);
goto fail;
}

View File

@ -176,21 +176,21 @@ ladish_command_new_app(
opath_dup = strdup(opath);
if (opath_dup == NULL)
{
lash_dbus_error(call_ptr, LASH_DBUS_ERROR_GENERIC, "strdup('%s') failed.", opath_dup);
lash_dbus_error(call_ptr, LASH_DBUS_ERROR_GENERIC, "strdup('%s') failed.", opath);
goto fail;
}
commandline_dup = strdup(commandline);
if (commandline_dup == NULL)
{
lash_dbus_error(call_ptr, LASH_DBUS_ERROR_GENERIC, "strdup('%s') failed.", commandline_dup);
lash_dbus_error(call_ptr, LASH_DBUS_ERROR_GENERIC, "strdup('%s') failed.", commandline);
goto fail_free_opath;
}
name_dup = strdup(name);
if (name_dup == NULL)
{
lash_dbus_error(call_ptr, LASH_DBUS_ERROR_GENERIC, "strdup('%s') failed.", name_dup);
lash_dbus_error(call_ptr, LASH_DBUS_ERROR_GENERIC, "strdup('%s') failed.", name);
goto fail_free_commandline;
}