]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9999 slapd-search: plug potential leak
authorHoward Chu <hyc@openldap.org>
Thu, 2 Feb 2023 15:18:24 +0000 (15:18 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Wed, 26 Apr 2023 17:31:34 +0000 (17:31 +0000)
tests/progs/slapd-search.c

index 13a2818885ede23d09abab19fd799c3da39a2ef3..f849199967c769f439200f3c614176f5ff5a7bfa 100644 (file)
@@ -214,6 +214,7 @@ do_random( struct tester_conn_args *config,
                        if ( rc ) {
                                tester_ldap_error( ld, "ldap_search_ext_s", NULL );
                        }
+                       ldap_msgfree( res );
                        break;
                }
 
@@ -270,6 +271,7 @@ do_random( struct tester_conn_args *config,
 
        default:
                tester_ldap_error( ld, "ldap_search_ext_s", NULL );
+               ldap_msgfree( res );
                break;
        }