]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[apr] scan-build: Fix "Argument with 'nonnull' attribute passed null" in file_io... 390/head
authorAndrey Volk <andywolk@gmail.com>
Wed, 19 Feb 2020 20:16:37 +0000 (00:16 +0400)
committerAndrey Volk <andywolk@gmail.com>
Wed, 19 Feb 2020 20:16:37 +0000 (00:16 +0400)
libs/apr/file_io/unix/filepath.c

index cbf757e9abe4a1bcc881b7ccbb356390fbce1267..64f1b2fbd4001829e01be5c8beb28a7dd91fc9cc 100644 (file)
@@ -139,6 +139,9 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
         if (rv != APR_SUCCESS)
             return errno;
 
+        if (!getpath)
+            return APR_ENOMEM;
+
         /* XXX: Any kernel subject to goofy, uncanonical results
          * must run the rootpath against the user's given flags.
          * Simplest would be a recursive call to apr_filepath_merge