Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 7053c3b3b35275a052b2411bf73c1c4f578a0322
      
https://github.com/tianocore/edk2/commit/7053c3b3b35275a052b2411bf73c1c4f578a0322
  Author: Daryl McDaniel <[email protected]>
  Date:   2016-02-17 (Wed, 17 Feb 2016)

  Changed paths:
    M StdLib/BsdSocketLib/res_mkupdate.c

  Log Message:
  -----------
  StdLib/BsdSocketLib: Fix minor memory leak by freeing rrecp on error return.

The error return is triggered by one of two conditions:
  1.  rrecp is NULL (calloc failed)
  2.  strdup(dname) returns NULL

Previously, the function just returned NULL.  This patch adds a call to
free rrecp before returning NULL.  Since the free() function will properly
do nothing when called with a NULL parameter, it is not necessary to
separate the two tests into separate if clauses.

Reported-by: Colin King <[email protected]>

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <[email protected]>
Reviewed-by: Jaben Carsey <[email protected]>


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to