This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] valops.c (find_oload_champ): Free malloced pointer.
- From: Michael Snyder <msnyder at vmware dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Fri, 04 Mar 2011 17:49:42 -0800
- Subject: [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;
}