This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/186/

src/service-dbus/util/serviceutil.c (Diff revision 1)
92
            tmps = strndup(primary_unit_name, strlen(primary_unit_name));
93
            slist->name[slist->cnt] = strndup(basename(tmps), strlen(basename(tmps)));
why not strdup? It runs strlen internally.

src/service-dbus/util/serviceutil.c (Diff revision 1)
93
            slist->name[slist->cnt] = strndup(basename(tmps), strlen(basename(tmps)));
please check str(n)dup results for NULL, it's like malloc.

src/service-dbus/util/serviceutil.c (Diff revision 1)
105
int Service_Get_Properties(
106
    Service *svc,
107
    const char *service)
This function allocates lot of data (strdup), I haven't found a place where it's released.

src/service-dbus/util/serviceutil.c (Diff revision 1)
117
    unsigned long tmp;
rename to value_long?

src/service-dbus/util/serviceutil.c (Diff revision 1)
121
    svc->svName = strdup(service);
check for strdup results

- Jan


On April 11th, 2013, 5:23 p.m. CEST, Vitezslav Crhonek wrote:

Review request for OpenLMI Developers.
By Vitezslav Crhonek.

Updated April 11, 2013, 5:23 p.m.

Repository: openlmi-providers

Description

service: added dbus based service provider

Diffs

  • README (7e17e458ef4699a62ec933a6d4a51f35588f97e1)
  • src/CMakeLists.txt (73189110171562bdcbaf56faff7d2d07b325a076)
  • src/service-dbus/CMakeLists.txt (PRE-CREATION)
  • src/service-dbus/LMI_ServiceProvider.c (PRE-CREATION)
  • src/service-dbus/util/serviceutil.h (PRE-CREATION)
  • src/service-dbus/util/serviceutil.c (PRE-CREATION)

View Diff