projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9284ed
)
gtestutils: use g_clear_pointer
author
Dan Winship
<danw@gnome.org>
Mon, 13 May 2013 15:38:53 +0000
(11:38 -0400)
committer
Dan Winship
<danw@gnome.org>
Mon, 13 May 2013 16:10:53 +0000
(12:10 -0400)
glib/gtestutils.c
patch
|
blob
|
history
diff --git
a/glib/gtestutils.c
b/glib/gtestutils.c
index
aed7908
..
6e34f65
100644
(file)
--- a/
glib/gtestutils.c
+++ b/
glib/gtestutils.c
@@
-2151,12
+2151,9
@@
test_trap_clear (void)
{
test_trap_last_status = 0;
test_trap_last_pid = 0;
- g_free (test_trap_last_subprocess);
- test_trap_last_subprocess = NULL;
- g_free (test_trap_last_stdout);
- test_trap_last_stdout = NULL;
- g_free (test_trap_last_stderr);
- test_trap_last_stderr = NULL;
+ g_clear_pointer (&test_trap_last_subprocess, g_free);
+ g_clear_pointer (&test_trap_last_stdout, g_free);
+ g_clear_pointer (&test_trap_last_stderr, g_free);
}
#ifdef G_OS_UNIX