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:
8af35ba
)
shared: check strdup != NULL
author
Evgeny Vereshchagin
<evvers@ya.ru>
Mon, 9 Jan 2017 22:45:41 +0000
(22:45 +0000)
committer
Evgeny Vereshchagin
<evvers@ya.ru>
Mon, 9 Jan 2017 22:45:41 +0000
(22:45 +0000)
This is a follow-up for
dc7dd61de610e9330
src/shared/install.c
patch
|
blob
|
history
diff --git
a/src/shared/install.c
b/src/shared/install.c
index
b7e8f14
..
478abac
100644
(file)
--- a/
src/shared/install.c
+++ b/
src/shared/install.c
@@
-1893,7
+1893,11
@@
int unit_file_unmask(
if (!GREEDY_REALLOC0(todo, n_allocated, n_todo + 2))
return -ENOMEM;
- todo[n_todo++] = strdup(*i);
+ todo[n_todo] = strdup(*i);
+ if (!todo[n_todo])
+ return -ENOMEM;
+
+ n_todo++;
}
strv_uniq(todo);