Re: Trash after build string
- From: Darin Adler <darin bentspoon com>
- To: Magnus Wirström <asdlinux linux se>
- Cc: Gnome-devel <gnome-devel-list gnome org>
- Subject: Re: Trash after build string
- Date: Wed, 30 May 2001 15:40:48 -0700
On Sunday, May 27, 2001, at 08:23  PM, Magnus Wirström wrote:
When I use g_strconcat I get trash after the actual string.
This line is wrong.
	test = g_strconcat(tar,"-x);
It should be:
	test = g_strconcat(tar,"-x",NULL);
Also, your example leaks storage. You should do:
	g_free(tarfile);
	g_free(tar);
	g_free(test);
at the end of the function.
    -- Darin
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]