All pastes #1659272 Raw Edit

teuf

public text v1 · immutable
#1659272 ·published 2009-11-06 09:06 UTC
rendered paste body
From 1139ee19307d78a5d43b99ed46e7c7d7665cfce2 Mon Sep 17 00:00:00 2001From: Nikias Bassen <nikias@gmx.li>Date: Thu, 5 Nov 2009 10:41:41 +0100Subject: [PATCH 2/2] Fix: avoid calling g_strdup without checking for NULL first.--- src/itdb_itunesdb.c |    3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.cindex eb29945..aa11eb2 100644--- a/src/itdb_itunesdb.c+++ b/src/itdb_itunesdb.c@@ -410,10 +410,11 @@ static void fcontents_free (FContents *cts) gchar * itdb_resolve_path (const gchar *root, 			   const gchar * const * components) {-  gchar *good_path = g_strdup(root);+  gchar *good_path;   guint32 i;    if (!root) return NULL;+  good_path = g_strdup(root);    for(i = 0 ; components[i] ; i++) {     GDir *cur_dir;-- 1.6.3.3