ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/lamps.c
(Generate patch)

Comparing ray/src/common/lamps.c (file contents):
Revision 2.1 by greg, Tue Nov 12 16:54:46 1991 UTC vs.
Revision 2.2 by greg, Tue Nov 10 10:29:22 1992 UTC

# Line 129 | Line 129 | freelamps()                    /* free our lamps list */
129   {
130          register LAMP   *lp1, *lp2;
131          
132 <        for (lp1 = lamps; lp1 != NULL; lp1 = lp1->next) {
132 >        for (lp1 = lamps; lp1 != NULL; lp1 = lp2) {
133                  free(lp1->pattern);
134                  if (lp1->color != NULL) {
135                          for (lp2 = lp1->next; lp2 != NULL; lp2 = lp2->next)
# Line 137 | Line 137 | freelamps()                    /* free our lamps list */
137                                          lp2->color = NULL;
138                          free((char *)lp1->color);
139                  }
140 +                lp2 = lp1->next;
141                  free((char *)lp1);
142          }
143          lamps = NULL;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines