mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Add missing check for allocation failure
Static analyzer discovered missing check.
This commit is contained in:
parent
425862fb95
commit
b23975ee28
@ -1,5 +1,6 @@
|
|||||||
Version 1.02.66 -
|
Version 1.02.66 -
|
||||||
===============================
|
===============================
|
||||||
|
Add missing check for allocation failure _create_dir_recursive().
|
||||||
Add support for systemd file descriptor handover in dmeventd.
|
Add support for systemd file descriptor handover in dmeventd.
|
||||||
Add support for new oom killer adjustment interface (oom_score_adj).
|
Add support for new oom killer adjustment interface (oom_score_adj).
|
||||||
Add systemd unit files for dmeventd.
|
Add systemd unit files for dmeventd.
|
||||||
|
@ -27,6 +27,11 @@ static int _create_dir_recursive(const char *dir)
|
|||||||
log_verbose("Creating directory \"%s\"", dir);
|
log_verbose("Creating directory \"%s\"", dir);
|
||||||
/* Create parent directories */
|
/* Create parent directories */
|
||||||
orig = s = dm_strdup(dir);
|
orig = s = dm_strdup(dir);
|
||||||
|
if (!s) {
|
||||||
|
log_error("Failed to duplicate directory name.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
while ((s = strchr(s, '/')) != NULL) {
|
while ((s = strchr(s, '/')) != NULL) {
|
||||||
*s = '\0';
|
*s = '\0';
|
||||||
if (*orig) {
|
if (*orig) {
|
||||||
|
Loading…
Reference in New Issue
Block a user