diff options
author | Colin Walters <walters@verbum.org> | 2012-04-09 15:48:20 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2012-04-09 15:57:46 -0400 |
commit | 87f45052af71a7b40cf2f806cabf595c57b60bf0 (patch) | |
tree | 9a4d5f63ae7e6bcf346983e2566b239cc691e628 /src/libotutil/ot-unix-utils.c | |
parent | ca08ad6c5e72f1b28aa2dab1d543166abb9f8622 (diff) | |
download | ostree-87f45052af71a7b40cf2f806cabf595c57b60bf0.tar.gz |
core: Port libotutil to local-alloc
Diffstat (limited to 'src/libotutil/ot-unix-utils.c')
-rw-r--r-- | src/libotutil/ot-unix-utils.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/libotutil/ot-unix-utils.c b/src/libotutil/ot-unix-utils.c index f07facb3..ee8f0397 100644 --- a/src/libotutil/ot-unix-utils.c +++ b/src/libotutil/ot-unix-utils.c @@ -37,12 +37,12 @@ gboolean ot_util_spawn_pager (GOutputStream **out_stream, GError **error) { + gboolean ret = FALSE; const char *pager; char *argv[2]; int stdin_fd; pid_t pid; - gboolean ret = FALSE; - GOutputStream *ret_stream = NULL; + ot_lfree GOutputStream *ret_stream = NULL; if (!isatty (1)) { @@ -70,7 +70,6 @@ ot_util_spawn_pager (GOutputStream **out_stream, ot_transfer_out_value(out_stream, &ret_stream); ret = TRUE; out: - g_clear_object (&ret_stream); return ret; } @@ -129,8 +128,8 @@ ot_util_path_split_validate (const char *path, GError **error) { gboolean ret = FALSE; - GPtrArray *ret_components = NULL; int i; + ot_lptrarray GPtrArray *ret_components = NULL; if (strlen (path) > PATH_MAX) { @@ -158,8 +157,6 @@ ot_util_path_split_validate (const char *path, ret = TRUE; ot_transfer_out_value(out_components, &ret_components); out: - if (ret_components) - g_ptr_array_unref (ret_components); return ret; } |