[Freeswitch-svn] [commit] r10261 - freeswitch/trunk/src
Freeswitch SVN
anthm at freeswitch.org
Wed Nov 5 19:09:45 EST 2008
Author: anthm
Date: Wed Nov 5 19:09:44 2008
New Revision: 10261
Modified:
freeswitch/trunk/src/switch_odbc.c
Log:
fix leak
Modified: freeswitch/trunk/src/switch_odbc.c
==============================================================================
--- freeswitch/trunk/src/switch_odbc.c (original)
+++ freeswitch/trunk/src/switch_odbc.c Wed Nov 5 19:09:44 2008
@@ -359,7 +359,8 @@
char **names;
char **vals;
int y = 0;
-
+ int done = 0;
+
if (!(result = SQLFetch(stmt)) == SQL_SUCCESS) {
break;
}
@@ -385,7 +386,7 @@
}
if (callback(pdata, y, vals, names)) {
- break;
+ done = 1;
}
for (x = 0; x < y; x++) {
@@ -394,6 +395,10 @@
}
free(names);
free(vals);
+
+ if (done) {
+ break;
+ }
}
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
More information about the Freeswitch-svn
mailing list