[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ltdl.c patch
From: |
Steve Ellcey |
Subject: |
ltdl.c patch |
Date: |
Tue, 24 Jul 2001 12:18:02 -0700 (PDT) |
I noticed that it is possible to try and free "canonical" in
foreach_dirinpath even if it is never initialized, for instance if we go
into one of the initial ifs at the start of foreach_dirinpath that has a
"goto cleanup" in it. This simple patch just initializes canonical to 0
so we don't try to free an undefined pointer. It will result in us
trying to free a NULL pointer but LT_DLFREE seems to deal with that.
I have a copyright assignment on file but no write permssion to the
CVS tree.
Steve Ellcey
address@hidden
*** ltdl.c.orig Tue Jul 24 11:34:04 2001
--- ltdl.c Tue Jul 24 11:34:21 2001
*************** foreach_dirinpath (search_path, base_nam
*** 1718,1724 ****
int filenamesize = 0;
int lenbase = LT_DLSTRLEN (base_name);
char *filename = 0;
! char *canonical, *next;
LT_DLMUTEX_LOCK ();
--- 1718,1725 ----
int filenamesize = 0;
int lenbase = LT_DLSTRLEN (base_name);
char *filename = 0;
! char *canonical = 0;
! char *next;
LT_DLMUTEX_LOCK ();
- ltdl.c patch,
Steve Ellcey <=