Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coverity Scan (CID 1087255) [/libtizplatform/src/tizhttp.c:insert_kv_pair] : Resource leak #228

Closed
tizonia opened this issue Mar 6, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@tizonia
Copy link
Owner

commented Mar 6, 2016

  • CID : 1087255
  • Type : Resource leak
  • Impact : High
  • Status : New
  • First Detected : 09/11/13
  • Classification : Unclassified
  • Severity : Unspecified
  • Component : libtizplatform
  • Category : Resource leaks
  • File : /libtizplatform/src/tizhttp.c
  • Function : insert_kv_pair
154  p_kvp->p_key = strndup (ap_key, a_name_len);
155  p_kvp->p_value = strndup (ap_value, a_value_len);
156
    7. Condition NULL == p_kvp->p_key, taking false branch
    8. Condition NULL == p_kvp->p_value, taking true branch
157  if (NULL == p_kvp->p_key || NULL == p_kvp->p_value)
158    {
159      tiz_mem_free (p_kvp->p_key);
160      tiz_mem_free (p_kvp->p_value);

CID 1087255 (#1 of 1): Resource leak (RESOURCE_LEAK)
9. leaked_storage: Variable p_kvp going out of scope leaks the storage it points to.
161      return 1;
162    }

@tizonia tizonia added the bug label Mar 6, 2016

@juanrubio juanrubio closed this in d3662b1 Jan 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.