From 12a6999d02ec64cc4aabf3bc2b632a6aa51a63dc Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 5 Dec 2016 15:22:52 -0500 Subject: [PATCH] [ASAN] tree-wide: Squash a few string leaks Just a few random string leaks. Closes: #533 Approved by: jlebon --- src/daemon/rpmostreed-os.c | 2 +- src/libpriv/rpmostree-core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/daemon/rpmostreed-os.c b/src/daemon/rpmostreed-os.c index f4f52833..d8dd8ffd 100644 --- a/src/daemon/rpmostreed-os.c +++ b/src/daemon/rpmostreed-os.c @@ -1210,7 +1210,7 @@ rpmostreed_os_new (OstreeSysroot *sysroot, RpmostreedTransactionMonitor *monitor) { RpmostreedOS *obj = NULL; - const gchar *path; + g_autofree char *path = NULL; g_return_val_if_fail (OSTREE_IS_SYSROOT (sysroot), NULL); g_return_val_if_fail (name != NULL, NULL); diff --git a/src/libpriv/rpmostree-core.c b/src/libpriv/rpmostree-core.c index 5c70776f..795a6e1e 100644 --- a/src/libpriv/rpmostree-core.c +++ b/src/libpriv/rpmostree-core.c @@ -1866,7 +1866,7 @@ rpmostree_context_assemble_commit (RpmOstreeContext *self, g_hash_table_new_full (NULL, NULL, (GDestroyNotify)g_object_unref, (GDestroyNotify)g_free); DnfPackage *filesystem_package = NULL; /* It's special... */ int r; - char *tmp_metadata_dir_path = NULL; + g_autofree char *tmp_metadata_dir_path = NULL; glnx_fd_close int tmp_metadata_dfd = -1; g_autofree char *ret_commit_checksum = NULL; OstreeRepoCommitModifier *commit_modifier = NULL;