[Pkg-wmaker-commits] [wmppp.app] 73/120: wmgeneral: Don't call free on pointers we haven't malloced.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Thu Aug 27 12:04:37 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmppp.app.

commit 783dc92dcb611ba1fb1b1f3f825d31bb4b694c05
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Tue May 19 22:30:55 2015 -0500

    wmgeneral: Don't call free on pointers we haven't malloced.
    
    Could cause occasional segfaults.
---
 wmgeneral/wmgeneral.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/wmgeneral/wmgeneral.c b/wmgeneral/wmgeneral.c
index 436b196..7405123 100644
--- a/wmgeneral/wmgeneral.c
+++ b/wmgeneral/wmgeneral.c
@@ -141,12 +141,10 @@ void parse_rcfile(const char *filename, rckeys *keys) {
 					p += strlen(keys[key].label);
 					p += strspn(p, tokens);
 					if ((i = strcspn(p, "#\n"))) p[i] = '\0';
-					free(*keys[key].var);
 					*keys[key].var = strdup(p);
 					key = -1;
 				} else key++;
 			}
-			free(q);
 		}
 		fclose(fp);
 	}
@@ -178,7 +176,6 @@ void parse_rcfile2(const char *filename, rckeys2 *keys) {
 					p += strlen(keys[key].label);
 					p += strspn(p, tokens);
 					if ((i = strcspn(p, "#\n"))) p[i] = 0;
-					free(*keys[key].var);
 					*keys[key].var = strdup(p);
 					key = -1;
 				} else key++;
@@ -186,7 +183,6 @@ void parse_rcfile2(const char *filename, rckeys2 *keys) {
 		}
 		fclose(fp);
 	}
-	free(family);
 }
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmppp.app.git



More information about the Pkg-wmaker-commits mailing list