[Date Prev][Date Next] [Chronological] [Thread] [Top]

Memory leak in referral code (ITS#596)



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--