[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: CVS update: o_misc.c



  User: ahvezda 
  Date: 07/04/15 22:55:36

  Modified:    .        o_misc.c
  Log:
  Fixed memory leak reported by valgrind
  
  
  
  
  Revision  Changes    Path
  1.43      +5 -0      eda/geda/gaf/gschem/src/o_misc.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_misc.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_misc.c,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -b -r1.42 -r1.43
  --- o_misc.c	24 Feb 2007 18:43:14 -0000	1.42
  +++ o_misc.c	16 Apr 2007 02:55:35 -0000	1.43
  @@ -1132,6 +1132,11 @@
                                &name, &value);
   
       attrfound = o_attrib_search_name_single(o_current, name, NULL); 
  +
  +    /* free these now since they are no longer being used */
  +    if (name) { g_free(name); }
  +    if (value) { g_free(value); }
  +
       if (attrfound == NULL) {
         /* attribute with same name not found in old component: */
         /* add new attribute to old component */
  
  
  


_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs