changeset 4639:8228a7b215bc

cppcheck: Fix Resource leak: dpidrc_stream (not closed on error condition)
author Jorge Arellano Cid <jcid@dillo.org>
date Di, 12 Jul 2016 13:57:44 -0400
parents 863b7f606578
children cd5c8221c721
files dpid/dpid.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dpid/dpid.c	Di Jul 12 13:55:20 2016 -0400
+++ b/dpid/dpid.c	Di Jul 12 13:57:44 2016 -0400
@@ -462,6 +462,7 @@
 
    if (*services_list != NULL) {
       ERRMSG("fill_services_list", "services_list parameter is not NULL", 0);
+      fclose(dpidrc_stream);
       return -1;
    }
    *services_list = dList_new(8);