# NetworkManager-0.9.9.1-7909.9ef23947cc.fc20

## List of Defects

    Error: NULL_RETURNS (CWE-476): [#def1]
    NetworkManager-0.9.9.1/cli/src/utils.c:797: returned_null: Function "g_malloc0(gsize)" returns null.
    NetworkManager-0.9.9.1/cli/src/utils.c:797: var_assigned: Assigning: "row" = null return value from "g_malloc0(gsize)".
    NetworkManager-0.9.9.1/cli/src/utils.c:799: dereference: Dereferencing a null pointer "row".

    Error: DEADCODE (CWE-561): [#def2]
    NetworkManager-0.9.9.1/docs/libnm-glib/libnm-glib-scan.c:1151: assignment: Assigning: "child_prop" = "0".
    NetworkManager-0.9.9.1/docs/libnm-glib/libnm-glib-scan.c:1166: const: At condition "child_prop", the value of "child_prop" must be equal to 0.
    NetworkManager-0.9.9.1/docs/libnm-glib/libnm-glib-scan.c:1166: dead_error_condition: The condition "child_prop" cannot be true.
    NetworkManager-0.9.9.1/docs/libnm-glib/libnm-glib-scan.c:1166: dead_error_line: Execution cannot reach this expression "style_prop" inside statement "if (child_prop && !style_pr...".

    Error: DEADCODE (CWE-561): [#def3]
    NetworkManager-0.9.9.1/docs/libnm-glib/libnm-glib-scan.c:1152: assignment: Assigning: "style_prop" = "0".
    NetworkManager-0.9.9.1/docs/libnm-glib/libnm-glib-scan.c:1168: const: At condition "style_prop", the value of "style_prop" must be equal to 0.
    NetworkManager-0.9.9.1/docs/libnm-glib/libnm-glib-scan.c:1168: dead_error_condition: The condition "style_prop" cannot be true.
    NetworkManager-0.9.9.1/docs/libnm-glib/libnm-glib-scan.c:1169: dead_error_line: Execution cannot reach this statement "*pos++ = 's';".

    Error: DEADCODE (CWE-561): [#def4]
    NetworkManager-0.9.9.1/docs/libnm-util/libnm-util-scan.c:1246: assignment: Assigning: "child_prop" = "0".
    NetworkManager-0.9.9.1/docs/libnm-util/libnm-util-scan.c:1261: const: At condition "child_prop", the value of "child_prop" must be equal to 0.
    NetworkManager-0.9.9.1/docs/libnm-util/libnm-util-scan.c:1261: dead_error_condition: The condition "child_prop" cannot be true.
    NetworkManager-0.9.9.1/docs/libnm-util/libnm-util-scan.c:1261: dead_error_line: Execution cannot reach this expression "style_prop" inside statement "if (child_prop && !style_pr...".

    Error: DEADCODE (CWE-561): [#def5]
    NetworkManager-0.9.9.1/docs/libnm-util/libnm-util-scan.c:1247: assignment: Assigning: "style_prop" = "0".
    NetworkManager-0.9.9.1/docs/libnm-util/libnm-util-scan.c:1263: const: At condition "style_prop", the value of "style_prop" must be equal to 0.
    NetworkManager-0.9.9.1/docs/libnm-util/libnm-util-scan.c:1263: dead_error_condition: The condition "style_prop" cannot be true.
    NetworkManager-0.9.9.1/docs/libnm-util/libnm-util-scan.c:1264: dead_error_line: Execution cannot reach this statement "*pos++ = 's';".

    Error: RESOURCE_LEAK (CWE-772): [#def6]
    NetworkManager-0.9.9.1/libgsystem/gsystem-file-utils.c:69: open_fn: Returning handle opened by function "open(char const *, int, ...)".
    NetworkManager-0.9.9.1/libgsystem/gsystem-file-utils.c:69: var_assign: Assigning: "res" = handle returned from "open(path, flags, mode)".
    NetworkManager-0.9.9.1/libgsystem/gsystem-file-utils.c:69: overwrite_var: Overwriting handle "res" in "res = open(path, flags, mode)" leaks the handle.

    Error: RESOURCE_LEAK (CWE-772): [#def7]
    NetworkManager-0.9.9.1/libgsystem/gsystem-file-utils.c:348: open_fn: Returning handle opened by function "open_nointr(char const *, int, mode_t)".
    NetworkManager-0.9.9.1/libgsystem/gsystem-file-utils.c:69:5: open_fn: Returning handle opened by function "open(char const *, int, ...)".
    NetworkManager-0.9.9.1/libgsystem/gsystem-file-utils.c:69:5: var_assign: Assigning: "res" = "open(path, flags, mode)".
    NetworkManager-0.9.9.1/libgsystem/gsystem-file-utils.c:71:3: return_handle: Returning opened handle "res".
    NetworkManager-0.9.9.1/libgsystem/gsystem-file-utils.c:348: var_assign: Assigning: "fd" = handle returned from "open_nointr(gs_file_get_path_cached(file), 193, mode)".
    NetworkManager-0.9.9.1/libgsystem/gsystem-file-utils.c:368: leaked_handle: Handle variable "fd" going out of scope leaks the handle.

    Error: NULL_RETURNS (CWE-476): [#def8]
    NetworkManager-0.9.9.1/libnm-util/crypto_nss.c:336: returned_null: Function "g_malloc0(gsize)" returns null.
    NetworkManager-0.9.9.1/libnm-util/crypto_nss.c:336: var_assigned: Assigning: "padded_buf" = null return value from "g_malloc0(gsize)".
    NetworkManager-0.9.9.1/libnm-util/crypto_nss.c:338: dereference: Dereferencing a pointer that might be null "padded_buf" when calling "memcpy(void * restrict, void const * restrict, size_t)".

    Error: NULL_RETURNS (CWE-476): [#def9]
    NetworkManager-0.9.9.1/libnm-util/crypto_nss.c:336: returned_null: Function "g_malloc0(gsize)" returns null.
    NetworkManager-0.9.9.1/libnm-util/crypto_nss.c:336: var_assigned: Assigning: "padded_buf" = null return value from "g_malloc0(gsize)".
    NetworkManager-0.9.9.1/libnm-util/crypto_nss.c:340: dereference: Dereferencing a null pointer "padded_buf".

    Error: RESOURCE_LEAK (CWE-772): [#def10]
    NetworkManager-0.9.9.1/libnm-util/nm-setting-vlan.c:262: alloc_fn: Storage is returned from allocation function "priority_map_new_from_str(NMVlanPriorityMap, char const *)".
    NetworkManager-0.9.9.1/libnm-util/nm-setting-vlan.c:191:4: alloc_fn: Storage is returned from allocation function "g_malloc0(gsize)".
    NetworkManager-0.9.9.1/libnm-util/nm-setting-vlan.c:191:4: var_assign: Assigning: "p" = "g_malloc0(8UL)".
    NetworkManager-0.9.9.1/libnm-util/nm-setting-vlan.c:201:2: return_alloc: Returning allocated memory "p".
    NetworkManager-0.9.9.1/libnm-util/nm-setting-vlan.c:262: var_assign: Assigning: "item" = storage returned from "priority_map_new_from_str(map, str)".
    NetworkManager-0.9.9.1/libnm-util/nm-setting-vlan.c:263: leaked_storage: Variable "item" going out of scope leaks the storage it points to.

    Error: NULL_RETURNS (CWE-476): [#def11]
    NetworkManager-0.9.9.1/libnm-util/nm-utils.c:2126: returned_null: Function "g_malloc0(gsize)" returns null.
    NetworkManager-0.9.9.1/libnm-util/nm-utils.c:2126: var_assigned: Assigning: "result" = null return value from "g_malloc0(gsize)".
    NetworkManager-0.9.9.1/libnm-util/nm-utils.c:2129: dereference: Dereferencing a null pointer "result".

    Error: NULL_RETURNS (CWE-476): [#def12]
    NetworkManager-0.9.9.1/src/platform/wifi/wifi-utils-nl80211.c:744: returned_null: Function "g_malloc0(gsize)" returns null.
    NetworkManager-0.9.9.1/src/platform/wifi/wifi-utils-nl80211.c:744: var_assigned: Assigning: "info->freqs" = null return value from "g_malloc0(gsize)".
    NetworkManager-0.9.9.1/src/platform/wifi/wifi-utils-nl80211.c:760: dereference: Dereferencing a null pointer "info->freqs".

    Error: NULL_RETURNS (CWE-476): [#def13]
    NetworkManager-0.9.9.1/src/platform/wifi/wifi-utils.c:40: returned_null: Function "g_malloc0(gsize)" returns null.
    NetworkManager-0.9.9.1/src/platform/wifi/wifi-utils.c:40: var_assigned: Assigning: "data" = null return value from "g_malloc0(gsize)".
    NetworkManager-0.9.9.1/src/platform/wifi/wifi-utils.c:41: dereference: Dereferencing a null pointer "data".

    Error: NULL_RETURNS (CWE-476): [#def14]
    NetworkManager-0.9.9.1/src/settings/nm-agent-manager.c:459: returned_null: Function "g_malloc0(gsize)" returns null.
    NetworkManager-0.9.9.1/src/settings/nm-agent-manager.c:459: var_assigned: Assigning: "req" = null return value from "g_malloc0(gsize)".
    NetworkManager-0.9.9.1/src/settings/nm-agent-manager.c:460: dereference: Dereferencing a null pointer "req".

    Error: NULL_RETURNS (CWE-476): [#def15]
    NetworkManager-0.9.9.1/src/settings/nm-settings-connection.c:1813: returned_null: Function "g_malloc0(gsize)" returns null.
    NetworkManager-0.9.9.1/src/settings/nm-settings-connection.c:1813: var_assigned: Assigning: "list" = null return value from "g_malloc0(gsize)".
    NetworkManager-0.9.9.1/src/settings/nm-settings-connection.c:1816: dereference: Dereferencing a null pointer "list".

## Scan Properties

analyzer | coverity
analyzer-args | --wait-for-license -co BAD_FREE:allow_first_field:true
analyzer-version | Coverity Static Analysis for C/C++ version 6.6.2 on Linux 2.6.32-279.el6.x86_64 x86_64\nInternal version numbers: e8c6bad8ec p-eureka-push-15003.350
compilation-unit-count | 381
compilation-unit-ratio | 100
host | cov01.lab.eng.brq.redhat.com
lines-processed | 267088
mock-config | fedora-20-x86_64
project-name | NetworkManager-0.9.9.1-7909.9ef23947cc.fc20
time-created | 2014-05-02 15:26:39
time-elapsed-analysis | 00:03:38
time-finished | 2014-05-02 15:38:17
tool | csmock
tool-args | 'fedora-20-x86_64' '/tmp/covscan_jpunQ_/NetworkManager-0.9.9.1-7909.9ef23947cc.fc20.src.rpm' '--all'
tool-version | csmock-1.0.7.20140428.142105.g0a21e2e-1.el6.noarch csdiff-1.0.4.20140326.153331.gbcf1def-1.el6.x86_64