Hello there Jeff,

----------------------------------------
> Just eyeballing it, that looks right to me. It just needs your
> original bug report above the Signed-off-by.

Righto. Second try:

Hello there,

[linux-4.2-rc2/arch/um/drivers/net_user.c:258]: (error) va_list 'ap' was opened 
but not closed by va_end().

Source code is

    va_start(ap, str);
    while ((arg = va_arg(ap, char **)) != NULL) {
        if (*str == '\0')
            return NULL;
        end = strchr(str, ',');
        if (end != str)
            *arg = str;
        if (end == NULL)
            return NULL;
        *end++ = '\0';
        str = end;
    }
    va_end(ap);
    return str;

If va_end needs to be called for successful return, it probably also
needs to be called for NULL return (twice).

Regards

David Binderman

Signed-off-by: David Binderman <dcb...@hotmail.com>

--- linux-4.2-rc2/arch/um/drivers/net_user.c.sav    2015-07-13 15:41:33.2115
48852 +0100
+++ linux-4.2-rc2/arch/um/drivers/net_user.c    2015-07-13 15:42:50.191786525 +0
100
@@ -254,13 +254,17 @@ char *split_if_spec(char *str, ...)
 
     va_start(ap, str);
     while ((arg = va_arg(ap, char **)) != NULL) {
-        if (*str == '\0')
+        if (*str == '\0') {
+            va_end(ap);
             return NULL;
+        }
         end = strchr(str, ',');
         if (end != str)
             *arg = str;
-        if (end == NULL)
+        if (end == NULL) {
+            va_end(ap);
             return NULL;
+        }
         *end++ = '\0';
         str = end;
     }

                                          
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to