Task #123185 - added.err

back to task #123185
download
Error: CPPCHECK_WARNING (CWE-476):
avahi-0.9.rc4/avahi-daemon/dbus-protocol.c:287: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
#  285|   
#  286|       s = malloc(10);
#  287|->     s[0] = '\0';
#  288|       avahi_log_debug("%s", s);
#  289|       free(s);

Error: GCC_ANALYZER_WARNING (CWE-476):
avahi-0.9.rc4/avahi-daemon/dbus-protocol.c: scope_hint: In function ‘dbus_is_ns_support_available’
avahi-0.9.rc4/avahi-daemon/dbus-protocol.c:287:10: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘s’
#  285|   
#  286|       s = malloc(10);
#  287|->     s[0] = '\0';
#  288|       avahi_log_debug("%s", s);
#  289|       free(s);

Error: CPPCHECK_WARNING (CWE-415):
avahi-0.9.rc4/avahi-daemon/dbus-protocol.c:293: error[doubleFree]: Memory pointed to by 's' is freed twice.
#  291|           return dbus_parsing_error("Error parsing Server::IsNSSSupportAvailable message", error);
#  292|       }
#  293|->     free(s);
#  294|   
#  295|       return avahi_dbus_respond_boolean(c, m, nss_support);

Error: GCC_ANALYZER_WARNING (CWE-415):
avahi-0.9.rc4/avahi-daemon/dbus-protocol.c:293:5: warning[-Wanalyzer-double-free]: double-‘free’ of ‘s’
#  291|           return dbus_parsing_error("Error parsing Server::IsNSSSupportAvailable message", error);
#  292|       }
#  293|->     free(s);
#  294|   
#  295|       return avahi_dbus_respond_boolean(c, m, nss_support);

Error: COMPILER_WARNING:
avahi-0.9.rc4/avahi-daemon/dbus-protocol.c: scope_hint: In function ‘dbus_is_ns_support_available’
avahi-0.9.rc4/avahi-daemon/dbus-protocol.c:293:5: warning[-Wuse-after-free]: pointer ‘s_7’ may be used after ‘free’
#  293 |     free(s);
#      |     ^~~~~~~
avahi-0.9.rc4/avahi-daemon/dbus-protocol.c:289:5: note: call to ‘free’ here
#  289 |     free(s);
#      |     ^~~~~~~
#  291|           return dbus_parsing_error("Error parsing Server::IsNSSSupportAvailable message", error);
#  292|       }
#  293|->     free(s);
#  294|   
#  295|       return avahi_dbus_respond_boolean(c, m, nss_support);

Error: CLANG_WARNING:
avahi-0.9.rc4/avahi-daemon/dbus-protocol.c:293:5: warning[unix.Malloc]: Attempt to release already released memory
#  291|           return dbus_parsing_error("Error parsing Server::IsNSSSupportAvailable message", error);
#  292|       }
#  293|->     free(s);
#  294|   
#  295|       return avahi_dbus_respond_boolean(c, m, nss_support);