[systemd-devel] [PATCH 5/5] strv: multiple cleanups
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Sat Jan 4 22:05:04 PST 2014
Looks great, except for one issue:
On Sat, Jan 04, 2014 at 02:35:27AM +0100, Simon Peeters wrote:
> @@ -1865,14 +1863,11 @@ finish:
> watchdog_close(false);
>
> /* Tell the binary how often to ping */
> - snprintf(e, sizeof(e), "WATCHDOG_USEC=%llu", (unsigned long long) arg_shutdown_watchdog);
> - char_array_0(e);
> + asprintf(&e, "WATCHDOG_USEC=%llu", (unsigned long long) arg_shutdown_watchdog);
>
> - env_block = strv_append(environ, e);
> - } else {
> - env_block = strv_copy(environ);
> + strv_push(&env_block, e);
Should there be oom handling here?
Zbyszek
More information about the systemd-devel
mailing list