]> git.sur5r.net Git - openldap/commitdiff
Memory leak in referral code (ITS#596)
authorKurt Zeilenga <kurt@openldap.org>
Fri, 16 Jun 2000 20:00:21 +0000 (20:00 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 16 Jun 2000 20:00:21 +0000 (20:00 +0000)
Apply patch from Steve Sonntag <vtag@novell.com>

libraries/libldap/result.c

index 475effc9d5c062caa9b4e015e625a0eb752f01c3..6fa1ef19fecf11861c9e11f599aa389d8bc04faa 100644 (file)
@@ -464,6 +464,15 @@ try_read1msg(
                                                }
                                        }
                                }
+
+                               if( lr->lr_res_matched != NULL ) {
+                                       LDAP_FREE( lr->lr_res_matched );
+                                       lr->lr_res_matched = NULL;
+                               }
+                               if( lr->lr_res_error != NULL ) {
+                                       LDAP_FREE( lr->lr_res_error );
+                                       lr->lr_res_error = NULL;
+                               }
                        }
                }
        }