This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] valops.c (find_oload_champ): Free malloced pointer.


OK?

2011-03-04  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>

	* valops.c (find_oload_champ): Free malloced pointer.

Index: valops.c
===================================================================
RCS file: /cvs/src/src/gdb/valops.c,v
retrieving revision 1.273
diff -u -p -r1.273 valops.c
--- valops.c	26 Feb 2011 02:07:09 -0000	1.273
+++ valops.c	5 Mar 2011 01:47:36 -0000
@@ -2956,7 +2956,7 @@ find_oload_champ (struct type **arg_type
 {
   int ix;
   /* A measure of how good an overloaded instance is.  */
-  struct badness_vector *bv;
+  struct badness_vector *bv = NULL;
   /* Index of best overloaded function.  */
   int oload_champ = -1;
   /* Current ambiguity state for overload resolution.  */
@@ -3044,7 +3044,7 @@ find_oload_champ (struct type **arg_type
 			    oload_champ, oload_ambiguous);
 	}
     }
-
+  xfree (bv);
   return oload_champ;
 }
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]