diff options
author | mananth <mananth> | 2004-03-19 09:40:35 +0000 |
---|---|---|
committer | mananth <mananth> | 2004-03-19 09:40:35 +0000 |
commit | d8172dc226b7fd33d655d7c28f63f89c0e2c9070 (patch) | |
tree | 937f3de1f2637ba79e6b267e1adee2f70cac7a6a | |
parent | 8d6a55f3048d415b621436b54018ee1f41cfbe94 (diff) | |
download | sysfsutils-d8172dc226b7fd33d655d7c28f63f89c0e2c9070.tar.gz |
Fix SEGV in dlist.c - patch by Dr. Hans Reinecke
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | lib/dlist.c | 4 |
2 files changed, 5 insertions, 2 deletions
@@ -1,4 +1,7 @@ +03/19/2004 - Dr. Hannes Reinecke <hare@suse.de> + * Fixed SEGV in dlist.c + 03/15/2004 - Ananth Mavinakayanahalli <ananth@in.ibm.com> * Updated docs/libsysfs.txt for release 1.1.0 diff --git a/lib/dlist.c b/lib/dlist.c index c6b104c..a324624 100644 --- a/lib/dlist.c +++ b/lib/dlist.c @@ -73,14 +73,14 @@ inline void *_dlist_mark_move(Dlist *list,int direction) { if(direction) { - if( list->marker->next!=NULL) + if( list->marker && list->marker->next!=NULL) list->marker=list->marker->next; else return(NULL); } else { - if( list->marker->prev!=NULL) + if( list->marker && list->marker->prev!=NULL) list->marker=list->marker->prev; else return(NULL); |