From: <arc...@us...> - 2013-02-15 00:44:05
|
Revision: 632 http://sourceforge.net/p/sipp/code/632 Author: arcady-91 Date: 2013-02-15 00:44:00 +0000 (Fri, 15 Feb 2013) Log Message: ----------- Fixing resource leak identified by cppcheck Modified Paths: -------------- sipp/trunk/scenario.cpp sipp/trunk/xp_parser.c Modified: sipp/trunk/scenario.cpp =================================================================== --- sipp/trunk/scenario.cpp 2013-02-15 00:43:54 UTC (rev 631) +++ sipp/trunk/scenario.cpp 2013-02-15 00:44:00 UTC (rev 632) @@ -1183,13 +1183,16 @@ peer_addrs[std::string(temp_peer)] = peer_host; } }else { + fclose(f); ERROR("Cannot allocate memory!\n"); + return; } } } }else{ ERROR("Can not open slave_cfg file %s\n", slave_cfg_file); } + fclose(f); } Modified: sipp/trunk/xp_parser.c =================================================================== --- sipp/trunk/xp_parser.c 2013-02-15 00:43:54 UTC (rev 631) +++ sipp/trunk/xp_parser.c 2013-02-15 00:44:00 UTC (rev 632) @@ -189,6 +189,7 @@ xp_file[index++] = 0; xp_stack = 0; xp_position[xp_stack] = xp_file; + fclose(f) return 0; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |