]> git.sur5r.net Git - openldap/commitdiff
plug leaks...
authorPierangelo Masarati <ando@openldap.org>
Tue, 6 Dec 2005 22:56:58 +0000 (22:56 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 6 Dec 2005 22:56:58 +0000 (22:56 +0000)
servers/slapd/back-sql/entry-id.c

index 9d33b9df729ef27ff0800eeb7d25603e819ac5e5..300f2af4c0e692f3cb4dd325dc578068b120a440 100644 (file)
@@ -648,6 +648,11 @@ backsql_get_attr_vals( void *v_at, void *v_bsi )
                Debug( LDAP_DEBUG_TRACE, "backsql_get_attr_vals(): "
                        "error preparing query: %s\n", at->bam_query, 0, 0 );
                backsql_PrintErrors( bi->sql_db_env, bsi->bsi_dbh, sth, rc );
+#ifdef BACKSQL_COUNTQUERY
+               if ( append ) {
+                       attr_free( attr );
+               }
+#endif /* BACKSQL_COUNTQUERY */
                return 1;
        }
 
@@ -656,6 +661,11 @@ backsql_get_attr_vals( void *v_at, void *v_bsi )
        if ( rc != SQL_SUCCESS ) {
                Debug( LDAP_DEBUG_TRACE, "backsql_get_attr_vals(): "
                        "error binding key value parameter\n", 0, 0, 0 );
+#ifdef BACKSQL_COUNTQUERY
+               if ( append ) {
+                       attr_free( attr );
+               }
+#endif /* BACKSQL_COUNTQUERY */
                return 1;
        }
 
@@ -678,6 +688,11 @@ backsql_get_attr_vals( void *v_at, void *v_bsi )
                        at->bam_query, 0, 0 );
                backsql_PrintErrors( bi->sql_db_env, bsi->bsi_dbh, sth, rc );
                SQLFreeStmt( sth, SQL_DROP );
+#ifdef BACKSQL_COUNTQUERY
+               if ( append ) {
+                       attr_free( attr );
+               }
+#endif /* BACKSQL_COUNTQUERY */
                return 1;
        }