]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[apr-util] Fix issues reported by scan-build. 359/head
authorAndrey Volk <andywolk@gmail.com>
Fri, 14 Feb 2020 14:39:15 +0000 (18:39 +0400)
committerAndrey Volk <andywolk@gmail.com>
Fri, 14 Feb 2020 14:39:15 +0000 (18:39 +0400)
libs/apr-util/hooks/apr_hooks.c
libs/apr-util/misc/apr_queue.c
libs/apr-util/xml/apr_xml.c

index da0ae970581526dfa4cc8f3de626d934c2ac391e..776bc884e74eea35169ba4559baa035323b764c3 100644 (file)
@@ -180,7 +180,9 @@ static TSort *tsort(TSort *pData,int nItems)
                    break;
                }
     }
-    pTail->pNext=NULL;  /* unfudge the tail */
+       if (pTail) {
+               pTail->pNext = NULL;  /* unfudge the tail */
+       }
     return pHead;
 }
 
index e905a53ebba4a6c97a2211d6f790d86b47bc6a84..a947df8a089a39c120740b679037c47388b9a5a7 100644 (file)
@@ -222,7 +222,7 @@ APU_DECLARE(apr_status_t) apr_queue_trypush(apr_queue_t *queue, void *data)
     }
 
     if (apr_queue_full(queue)) {
-        rv = apr_thread_mutex_unlock(queue->one_big_mutex);
+        apr_thread_mutex_unlock(queue->one_big_mutex);
         return APR_EAGAIN;
     }
     
@@ -397,7 +397,7 @@ APU_DECLARE(apr_status_t) apr_queue_trypop(apr_queue_t *queue, void **data)
     }
 
     if (apr_queue_empty(queue)) {
-        rv = apr_thread_mutex_unlock(queue->one_big_mutex);
+        apr_thread_mutex_unlock(queue->one_big_mutex);
         return APR_EAGAIN;
     } 
 
index 73543555ff800ced98d133e83753884ab0c72fe9..a05348d60f523a4362ce8e713044f8bb0e314a08 100644 (file)
@@ -82,7 +82,7 @@ static int find_prefix(apr_xml_parser *parser, const char *prefix)
     ** prefix.
     */
     for (; elem; elem = elem->parent) {
-       apr_xml_ns_scope *ns_scope = elem->ns_scope;
+       apr_xml_ns_scope *ns_scope;
 
        for (ns_scope = elem->ns_scope; ns_scope; ns_scope = ns_scope->next) {
            if (strcmp(prefix, ns_scope->prefix) == 0) {