projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
684ecf3
)
systemd-analyze: free unit_times only if it is not NULL
author
Lukas Nykryn
<lnykryn@redhat.com>
Fri, 1 Mar 2013 17:30:00 +0000
(18:30 +0100)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Fri, 1 Mar 2013 21:43:57 +0000
(16:43 -0500)
src/analyze/systemd-analyze.c
patch
|
blob
|
history
diff --git
a/src/analyze/systemd-analyze.c
b/src/analyze/systemd-analyze.c
index
b7e1670
..
7603cc0
100644
(file)
--- a/
src/analyze/systemd-analyze.c
+++ b/
src/analyze/systemd-analyze.c
@@
-237,9
+237,11
@@
static int acquire_time_data(DBusConnection *bus, struct unit_times **out)
*out = unit_times;
return c;
fail:
- for (; c >= 0; c--)
- free(unit_times[c].name);
- free(unit_times);
+ if (unit_times) {
+ for (; c >= 0; c--)
+ free(unit_times[c].name);
+ free(unit_times);
+ }
return r;
}