Issue 596 - Memory leak in referral code
Summary: Memory leak in referral code
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-06-16 16:52 UTC by Steve Sonntag
Modified: 2014-08-01 21:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Kurt Zeilenga 2000-06-16 10:54:23 UTC
moved from Incoming to Development
Comment 1 Kurt Zeilenga 2000-06-16 11:01:49 UTC
changed notes
changed state Open to Closed
Comment 2 Steve Sonntag 2000-06-16 16:52:19 UTC
There is a memory leak in the referral code

The following partch fixes itIndex: result.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/result.c,v
retrieving revision 1.45
diff -u -w -r1.45 result.c
--- result.c 2000/06/01 18:59:22 1.45
+++ result.c 2000/06/16 16:43:38
@@ -465,6 +465,14 @@
      }
     }
    }
+   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;
+   }
   }
  }
 
Comment 3 Kurt Zeilenga 2000-06-16 18:01:00 UTC
Committed, thanks.

At 05:25 PM 6/16/00 GMT, VTAG@novell.com wrote:
>This is a MIME message. If you are reading this text, you may want to 
>consider changing to a mail reader or gateway that understands how to 
>properly handle MIME multipart messages.
>
>--=_01597F41.3455F28C
>Content-Type: text/plain; charset=US-ASCII
>Content-Transfer-Encoding: quoted-printable
>
>There is a memory leak in the referral code
>
>The following partch fixes itIndex: result.c
>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/result.c,v
>retrieving revision 1.45
>diff -u -w -r1.45 result.c
>--- result.c 2000/06/01 18:59:22 1.45
>+++ result.c 2000/06/16 16:43:38
>@@ -465,6 +465,14 @@
>      }
>     }
>    }
>+   if( lr->lr_res_matched !=3D NULL) {
>+    LDAP_FREE( lr->lr_res_matched );
>+    lr->lr_res_matched =3D NULL;
>+   }
>+   if( lr->lr_res_error !=3D NULL) {
>+    LDAP_FREE( lr->lr_res_error );
>+    lr->lr_res_error =3D NULL;
>+   }
>   }
>  }
>=20
>
>--=_01597F41.3455F28C
>Content-Type: text/html; charset=ISO-8859-1
>Content-Transfer-Encoding: quoted-printable
>
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
><HTML><HEAD>
><META content=3D"text/html; charset=3Diso-8859-1" http-equiv=3DContent-Type=
>>
><META content=3D"MSHTML 5.00.2014.210" name=3DGENERATOR></HEAD>
><BODY style=3D"FONT: 8pt MS Sans Serif; MARGIN-LEFT: 2px; MARGIN-TOP: =
>2px">
><DIV><FONT size=3D1>There is a memory leak in the referral code</FONT></DIV=
>>
><DIV>&nbsp;</DIV>
><DIV>The following partch fixes itIndex: result.c<BR><FONT=20
>face=3D"Courier New">=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR=
>>RCS=20
>file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/result.c,v<BR>retrieving=20=
>
>revision 1.45<BR>diff -u -w -r1.45 result.c<BR>--- result.c&nbsp;2000/06/01=
>=20
>18:59:22&nbsp;1.45<BR>+++ result.c&nbsp;2000/06/16 16:43:38<BR>@@ -465,6 =
>+465,14=20
>@@<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
>p;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>+&nbsp;&nbsp;&nbsp;if(=20
>lr-&gt;lr_res_matched !=3D NULL) {<BR>+&nbsp;&nbsp;&nbsp;&nbsp;LDAP_FREE(=
>=20
>lr-&gt;lr_res_matched );<BR>+&nbsp;&nbsp;&nbsp;&nbsp;lr-&gt;lr_res_matched =
>=3D=20
>NULL;<BR>+&nbsp;&nbsp;&nbsp;}<BR>+&nbsp;&nbsp;&nbsp;if( lr-&gt;lr_res_error=
> !=3D=20
>NULL) {<BR>+&nbsp;&nbsp;&nbsp;&nbsp;LDAP_FREE( lr-&gt;lr_res_error=20
>);<BR>+&nbsp;&nbsp;&nbsp;&nbsp;lr-&gt;lr_res_error =3D=20
>NULL;<BR>+&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;</FONT>=
>}<BR>&nbsp;</DIV>
><DIV>&nbsp;</DIV>
><DIV>&nbsp;</DIV></BODY></HTML>
>
>--=_01597F41.3455F28C--
>
>
Comment 4 OpenLDAP project 2014-08-01 21:05:27 UTC
Applied.