Constifying brought in lots of invalid free()
This commit is contained in:
parent
66100b5935
commit
9aa2097ac9
@ -1,5 +1,5 @@
|
|||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
/* Copyright (c) 2007 Pierre Pronchery <khorben@defora.org> */
|
/* Copyright (c) 2008 Pierre Pronchery <khorben@defora.org> */
|
||||||
/* This file is part of DeforaOS Devel configure */
|
/* This file is part of DeforaOS Devel configure */
|
||||||
/* configure is not free software; you can redistribute it and/or modify it
|
/* configure is not free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike
|
* under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike
|
||||||
@ -244,9 +244,11 @@ static int _load_subdirs(Prefs * prefs, char const * directory,
|
|||||||
int i;
|
int i;
|
||||||
char c;
|
char c;
|
||||||
String * subdir;
|
String * subdir;
|
||||||
|
String * p;
|
||||||
|
|
||||||
if((subdir = string_new(subdirs)) == NULL)
|
if((subdir = string_new(subdirs)) == NULL)
|
||||||
return 1;
|
return 1;
|
||||||
|
p = subdir;
|
||||||
for(i = 0; ret == 0; i++)
|
for(i = 0; ret == 0; i++)
|
||||||
{
|
{
|
||||||
if(subdir[i] != ',' && subdir[i] != '\0')
|
if(subdir[i] != ',' && subdir[i] != '\0')
|
||||||
@ -259,7 +261,7 @@ static int _load_subdirs(Prefs * prefs, char const * directory,
|
|||||||
subdir += i + 1;
|
subdir += i + 1;
|
||||||
i = 0;
|
i = 0;
|
||||||
}
|
}
|
||||||
string_delete(subdir);
|
string_delete(p);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user