diff options
author | Tedd Ho-Jeong An <tedd.an@intel.com> | 2021-10-18 10:28:32 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-10-18 15:31:55 -0700 |
commit | 96ffb02e2b4dd45a8b35b19b27776a1ce89d1ee0 (patch) | |
tree | ca7dc9c5620e2ce5ce0fef60dc348658be399011 /obexd/src | |
parent | 799f6ff793250bbc692964d000429549803528a1 (diff) | |
download | bluez-96ffb02e2b4dd45a8b35b19b27776a1ce89d1ee0.tar.gz |
obexd: Fix unchecked return value
This patch fixes the unchecked return value(CWE-252) issues reported by
the Coverity.
Diffstat (limited to 'obexd/src')
-rw-r--r-- | obexd/src/main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/obexd/src/main.c b/obexd/src/main.c index 04284c9e1..d950883f0 100644 --- a/obexd/src/main.c +++ b/obexd/src/main.c @@ -270,7 +270,9 @@ int main(int argc, char *argv[]) if (option_root == NULL) { option_root = g_build_filename(g_get_user_cache_dir(), "obexd", NULL); - g_mkdir_with_parents(option_root, 0700); + if (g_mkdir_with_parents(option_root, 0700) < 0) + error("Failed to create dir(%d): %s", errno, + option_root); } if (option_root[0] != '/') { |