From 3aefb8d965efb6646a32459958b64989375d4449 Mon Sep 17 00:00:00 2001
From: Alberto Bertogli <albertito@blitiri.com.ar>
Date: Wed, 25 Feb 2009 04:33:05 -0200
Subject: [PATCH 19/31] Initialize jdir properly in Python bindings

Otherwise, when we do not get jdir as a parameter, it has rubbish which
causes jfsck() and jfsck_cleanup() not to find the journal directory.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
---
 bindings/python/libjio.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bindings/python/libjio.c b/bindings/python/libjio.c
index 7dc2a9f..941d7b1 100644
--- a/bindings/python/libjio.c
+++ b/bindings/python/libjio.c
@@ -553,7 +553,7 @@ It's a wrapper to jfsck().\n");
 static PyObject *jf_jfsck(PyObject *self, PyObject *args)
 {
 	int rv;
-	char *name, *jdir;
+	char *name, *jdir = NULL;
 	struct jfsck_result res;
 	PyObject *dict;
 
@@ -599,7 +599,7 @@ It's a wrapper to jfsck_cleanup().\n");
 static PyObject *jf_jfsck_cleanup(PyObject *self, PyObject *args)
 {
 	long rv;
-	char *name, *jdir;
+	char *name, *jdir = NULL;
 
 	if (!PyArg_ParseTuple(args, "s|s:jfsck_cleanup", &name, &jdir))
 		return NULL;
-- 
1.6.2.rc0.226.gf08f

