diff mbox

fedfsc: Fix some Segmentation fault in fedfsc

Message ID 53B11BFB.6070905@cn.fujitsu.com
State Superseded
Headers show

Commit Message

Ditang Chen June 30, 2014, 8:12 a.m. UTC
(gdb) bt
#0  0x0000003607c4908f in vfprintf () from /lib64/libc.so.6
#1  0x0000003607d044b5 in __vsnprintf_chk () from /lib64/libc.so.6
#2  0x0000003607d04418 in __snprintf_chk () from /lib64/libc.so.6
#3  0x00000033aee0c87c in clnt_spcreateerror () from /lib64/libtirpc.so.1
#4  0x0000000000401cea in admin_open_perror (prefix=<optimized out>) at admin.c:368
#5  0x00000000004015a0 in fedfs_null_host (security=0x402b44 "unix", nettype=0x402b49 "netpath", hostname=0x402b51 "localhost")
    at fedfs-null.c:158
#6  main (argc=1, argv=0x7fffffffe358) at fedfs-null.c:217

Signed-off-by: Ditang Chen <chendt.fnst@cn.fujitsu.com>
---
 src/fedfsc/fedfs-create-junction.c         | 2 +-
 src/fedfsc/fedfs-create-replication.c      | 2 +-
 src/fedfsc/fedfs-delete-junction.c         | 2 +-
 src/fedfsc/fedfs-delete-replication.c      | 2 +-
 src/fedfsc/fedfs-get-limited-nsdb-params.c | 2 +-
 src/fedfsc/fedfs-get-nsdb-params.c         | 2 +-
 src/fedfsc/fedfs-lookup-junction.c         | 2 +-
 src/fedfsc/fedfs-lookup-replication.c      | 2 +-
 src/fedfsc/fedfs-null.c                    | 2 +-
 src/fedfsc/fedfs-set-nsdb-params.c         | 2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)

Comments

Chuck Lever June 30, 2014, 2:33 p.m. UTC | #1
Hi Ditang-

On Jun 30, 2014, at 4:12 AM, Ditang Chen <chendt.fnst@cn.fujitsu.com> wrote:

> (gdb) bt
> #0  0x0000003607c4908f in vfprintf () from /lib64/libc.so.6
> #1  0x0000003607d044b5 in __vsnprintf_chk () from /lib64/libc.so.6
> #2  0x0000003607d04418 in __snprintf_chk () from /lib64/libc.so.6
> #3  0x00000033aee0c87c in clnt_spcreateerror () from /lib64/libtirpc.so.1
> #4  0x0000000000401cea in admin_open_perror (prefix=<optimized out>) at admin.c:368
> #5  0x00000000004015a0 in fedfs_null_host (security=0x402b44 "unix", nettype=0x402b49 "netpath", hostname=0x402b51 "localhost")
>    at fedfs-null.c:158
> #6  main (argc=1, argv=0x7fffffffe358) at fedfs-null.c:217

Thanks for the report! These look familiar. They might be fixed in
0.10.3. Which version of fedfs-utils are you testing?


> Signed-off-by: Ditang Chen <chendt.fnst@cn.fujitsu.com>
> ---
> src/fedfsc/fedfs-create-junction.c         | 2 +-
> src/fedfsc/fedfs-create-replication.c      | 2 +-
> src/fedfsc/fedfs-delete-junction.c         | 2 +-
> src/fedfsc/fedfs-delete-replication.c      | 2 +-
> src/fedfsc/fedfs-get-limited-nsdb-params.c | 2 +-
> src/fedfsc/fedfs-get-nsdb-params.c         | 2 +-
> src/fedfsc/fedfs-lookup-junction.c         | 2 +-
> src/fedfsc/fedfs-lookup-replication.c      | 2 +-
> src/fedfsc/fedfs-null.c                    | 2 +-
> src/fedfsc/fedfs-set-nsdb-params.c         | 2 +-
> 10 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/src/fedfsc/fedfs-create-junction.c b/src/fedfsc/fedfs-create-junction.c
> index 987c02a..b8dc817 100644
> --- a/src/fedfsc/fedfs-create-junction.c
> +++ b/src/fedfsc/fedfs-create-junction.c
> @@ -153,7 +153,7 @@ fedfs_create_junction_host(const char *hostname, const char *nettype,
> 		const char *security, char * const *path_array,
> 		struct admin_fsn *fsn)
> {
> -	admin_t host;
> +	admin_t host = NULL;
> 	int status;
> 
> 	status = EXIT_FAILURE;
> diff --git a/src/fedfsc/fedfs-create-replication.c b/src/fedfsc/fedfs-create-replication.c
> index 4effb2c..ecb446c 100644
> --- a/src/fedfsc/fedfs-create-replication.c
> +++ b/src/fedfsc/fedfs-create-replication.c
> @@ -153,7 +153,7 @@ fedfs_create_replication_host(const char *hostname, const char *nettype,
> 		const char *security, char * const *path_array,
> 		struct admin_fsn *fsn)
> {
> -	admin_t host;
> +	admin_t host = NULL;
> 	int status;
> 
> 	status = EXIT_FAILURE;
> diff --git a/src/fedfsc/fedfs-delete-junction.c b/src/fedfsc/fedfs-delete-junction.c
> index 97bd072..0b68a95 100644
> --- a/src/fedfsc/fedfs-delete-junction.c
> +++ b/src/fedfsc/fedfs-delete-junction.c
> @@ -143,7 +143,7 @@ static int
> fedfs_delete_junction_host(const char *hostname, const char *nettype,
> 		const char *security, char * const *path_array)
> {
> -	admin_t host;
> +	admin_t host = NULL;
> 	int status;
> 
> 	status = EXIT_FAILURE;
> diff --git a/src/fedfsc/fedfs-delete-replication.c b/src/fedfsc/fedfs-delete-replication.c
> index aff44f6..d60e1db 100644
> --- a/src/fedfsc/fedfs-delete-replication.c
> +++ b/src/fedfsc/fedfs-delete-replication.c
> @@ -143,7 +143,7 @@ static int
> fedfs_delete_replication_host(const char *hostname, const char *nettype,
> 		const char *security, char * const *path_array)
> {
> -	admin_t host;
> +	admin_t host = NULL;
> 	int status;
> 
> 	status = EXIT_FAILURE;
> diff --git a/src/fedfsc/fedfs-get-limited-nsdb-params.c b/src/fedfsc/fedfs-get-limited-nsdb-params.c
> index ec66d86..24e4e9b 100644
> --- a/src/fedfsc/fedfs-get-limited-nsdb-params.c
> +++ b/src/fedfsc/fedfs-get-limited-nsdb-params.c
> @@ -170,7 +170,7 @@ static int
> fedfs_get_limited_nsdb_params_host(const char *hostname, const char *nettype,
> 		const char *security, struct admin_nsdb *nsdb)
> {
> -	admin_t host;
> +	admin_t host = NULL;
> 	int status;
> 
> 	status = EXIT_FAILURE;
> diff --git a/src/fedfsc/fedfs-get-nsdb-params.c b/src/fedfsc/fedfs-get-nsdb-params.c
> index 4bef1aa..bd6eef1 100644
> --- a/src/fedfsc/fedfs-get-nsdb-params.c
> +++ b/src/fedfsc/fedfs-get-nsdb-params.c
> @@ -186,7 +186,7 @@ fedfs_get_nsdb_params_host(const char *hostname, const char *nettype,
> 		const char *security, struct admin_nsdb *nsdb,
> 		const char *certfile)
> {
> -	admin_t host;
> +	admin_t host = NULL;
> 	int status;
> 
> 	status = EXIT_FAILURE;
> diff --git a/src/fedfsc/fedfs-lookup-junction.c b/src/fedfsc/fedfs-lookup-junction.c
> index b43a6ae..cfeb33e 100644
> --- a/src/fedfsc/fedfs-lookup-junction.c
> +++ b/src/fedfsc/fedfs-lookup-junction.c
> @@ -222,7 +222,7 @@ static int
> fedfs_lookup_junction_host(const char *hostname, const char *nettype,
> 		const char *security, char * const *path_array, int request)
> {
> -	admin_t host;
> +	admin_t host = NULL;
> 	int status;
> 
> 	status = EXIT_FAILURE;
> diff --git a/src/fedfsc/fedfs-lookup-replication.c b/src/fedfsc/fedfs-lookup-replication.c
> index e258f8b..70654f2 100644
> --- a/src/fedfsc/fedfs-lookup-replication.c
> +++ b/src/fedfsc/fedfs-lookup-replication.c
> @@ -223,7 +223,7 @@ static FedFsStatus
> fedfs_lookup_replication_host(const char *hostname, const char *nettype,
> 		const char *security, char * const *path_array, int request)
> {
> -	admin_t host;
> +	admin_t host = NULL;
> 	int status;
> 
> 	status = EXIT_FAILURE;
> diff --git a/src/fedfsc/fedfs-null.c b/src/fedfsc/fedfs-null.c
> index 8e63b7d..0e42729 100644
> --- a/src/fedfsc/fedfs-null.c
> +++ b/src/fedfsc/fedfs-null.c
> @@ -136,7 +136,7 @@ static int
> fedfs_null_host(const char *hostname, const char *nettype,
> 		const char *security)
> {
> -	admin_t host;
> +	admin_t host = NULL;
> 	int status;
> 
> 	status = EXIT_FAILURE;
> diff --git a/src/fedfsc/fedfs-set-nsdb-params.c b/src/fedfsc/fedfs-set-nsdb-params.c
> index 2ac3568..b914bb0 100644
> --- a/src/fedfsc/fedfs-set-nsdb-params.c
> +++ b/src/fedfsc/fedfs-set-nsdb-params.c
> @@ -156,7 +156,7 @@ fedfs_set_nsdb_params_host(const char *hostname, const char *nettype,
> 		const char *security, struct admin_nsdb *nsdb,
> 		struct admin_cert *cert)
> {
> -	admin_t host;
> +	admin_t host = NULL;
> 	int status;
> 
> 	status = EXIT_FAILURE;
> -- 
> 1.8.4.2

--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com
Chuck Lever June 30, 2014, 2:39 p.m. UTC | #2
On Jun 30, 2014, at 10:33 AM, Chuck Lever <chuck.lever@oracle.com> wrote:

> Hi Ditang-
> 
> On Jun 30, 2014, at 4:12 AM, Ditang Chen <chendt.fnst@cn.fujitsu.com> wrote:
> 
>> (gdb) bt
>> #0  0x0000003607c4908f in vfprintf () from /lib64/libc.so.6
>> #1  0x0000003607d044b5 in __vsnprintf_chk () from /lib64/libc.so.6
>> #2  0x0000003607d04418 in __snprintf_chk () from /lib64/libc.so.6
>> #3  0x00000033aee0c87c in clnt_spcreateerror () from /lib64/libtirpc.so.1
>> #4  0x0000000000401cea in admin_open_perror (prefix=<optimized out>) at admin.c:368
>> #5  0x00000000004015a0 in fedfs_null_host (security=0x402b44 "unix", nettype=0x402b49 "netpath", hostname=0x402b51 "localhost")
>>   at fedfs-null.c:158
>> #6  main (argc=1, argv=0x7fffffffe358) at fedfs-null.c:217
> 
> Thanks for the report! These look familiar. They might be fixed in
> 0.10.3.

Ooops, I meant 0.10.2. The tarballs are on git.linux-nfs.org, and the
0.10.2 package is in Fedora rawhide now, making it’s way to Fedora 20
this week, hopefully.


> Which version of fedfs-utils are you testing?
> 
> 
>> Signed-off-by: Ditang Chen <chendt.fnst@cn.fujitsu.com>
>> ---
>> src/fedfsc/fedfs-create-junction.c         | 2 +-
>> src/fedfsc/fedfs-create-replication.c      | 2 +-
>> src/fedfsc/fedfs-delete-junction.c         | 2 +-
>> src/fedfsc/fedfs-delete-replication.c      | 2 +-
>> src/fedfsc/fedfs-get-limited-nsdb-params.c | 2 +-
>> src/fedfsc/fedfs-get-nsdb-params.c         | 2 +-
>> src/fedfsc/fedfs-lookup-junction.c         | 2 +-
>> src/fedfsc/fedfs-lookup-replication.c      | 2 +-
>> src/fedfsc/fedfs-null.c                    | 2 +-
>> src/fedfsc/fedfs-set-nsdb-params.c         | 2 +-
>> 10 files changed, 10 insertions(+), 10 deletions(-)
>> 
>> diff --git a/src/fedfsc/fedfs-create-junction.c b/src/fedfsc/fedfs-create-junction.c
>> index 987c02a..b8dc817 100644
>> --- a/src/fedfsc/fedfs-create-junction.c
>> +++ b/src/fedfsc/fedfs-create-junction.c
>> @@ -153,7 +153,7 @@ fedfs_create_junction_host(const char *hostname, const char *nettype,
>> 		const char *security, char * const *path_array,
>> 		struct admin_fsn *fsn)
>> {
>> -	admin_t host;
>> +	admin_t host = NULL;
>> 	int status;
>> 
>> 	status = EXIT_FAILURE;
>> diff --git a/src/fedfsc/fedfs-create-replication.c b/src/fedfsc/fedfs-create-replication.c
>> index 4effb2c..ecb446c 100644
>> --- a/src/fedfsc/fedfs-create-replication.c
>> +++ b/src/fedfsc/fedfs-create-replication.c
>> @@ -153,7 +153,7 @@ fedfs_create_replication_host(const char *hostname, const char *nettype,
>> 		const char *security, char * const *path_array,
>> 		struct admin_fsn *fsn)
>> {
>> -	admin_t host;
>> +	admin_t host = NULL;
>> 	int status;
>> 
>> 	status = EXIT_FAILURE;
>> diff --git a/src/fedfsc/fedfs-delete-junction.c b/src/fedfsc/fedfs-delete-junction.c
>> index 97bd072..0b68a95 100644
>> --- a/src/fedfsc/fedfs-delete-junction.c
>> +++ b/src/fedfsc/fedfs-delete-junction.c
>> @@ -143,7 +143,7 @@ static int
>> fedfs_delete_junction_host(const char *hostname, const char *nettype,
>> 		const char *security, char * const *path_array)
>> {
>> -	admin_t host;
>> +	admin_t host = NULL;
>> 	int status;
>> 
>> 	status = EXIT_FAILURE;
>> diff --git a/src/fedfsc/fedfs-delete-replication.c b/src/fedfsc/fedfs-delete-replication.c
>> index aff44f6..d60e1db 100644
>> --- a/src/fedfsc/fedfs-delete-replication.c
>> +++ b/src/fedfsc/fedfs-delete-replication.c
>> @@ -143,7 +143,7 @@ static int
>> fedfs_delete_replication_host(const char *hostname, const char *nettype,
>> 		const char *security, char * const *path_array)
>> {
>> -	admin_t host;
>> +	admin_t host = NULL;
>> 	int status;
>> 
>> 	status = EXIT_FAILURE;
>> diff --git a/src/fedfsc/fedfs-get-limited-nsdb-params.c b/src/fedfsc/fedfs-get-limited-nsdb-params.c
>> index ec66d86..24e4e9b 100644
>> --- a/src/fedfsc/fedfs-get-limited-nsdb-params.c
>> +++ b/src/fedfsc/fedfs-get-limited-nsdb-params.c
>> @@ -170,7 +170,7 @@ static int
>> fedfs_get_limited_nsdb_params_host(const char *hostname, const char *nettype,
>> 		const char *security, struct admin_nsdb *nsdb)
>> {
>> -	admin_t host;
>> +	admin_t host = NULL;
>> 	int status;
>> 
>> 	status = EXIT_FAILURE;
>> diff --git a/src/fedfsc/fedfs-get-nsdb-params.c b/src/fedfsc/fedfs-get-nsdb-params.c
>> index 4bef1aa..bd6eef1 100644
>> --- a/src/fedfsc/fedfs-get-nsdb-params.c
>> +++ b/src/fedfsc/fedfs-get-nsdb-params.c
>> @@ -186,7 +186,7 @@ fedfs_get_nsdb_params_host(const char *hostname, const char *nettype,
>> 		const char *security, struct admin_nsdb *nsdb,
>> 		const char *certfile)
>> {
>> -	admin_t host;
>> +	admin_t host = NULL;
>> 	int status;
>> 
>> 	status = EXIT_FAILURE;
>> diff --git a/src/fedfsc/fedfs-lookup-junction.c b/src/fedfsc/fedfs-lookup-junction.c
>> index b43a6ae..cfeb33e 100644
>> --- a/src/fedfsc/fedfs-lookup-junction.c
>> +++ b/src/fedfsc/fedfs-lookup-junction.c
>> @@ -222,7 +222,7 @@ static int
>> fedfs_lookup_junction_host(const char *hostname, const char *nettype,
>> 		const char *security, char * const *path_array, int request)
>> {
>> -	admin_t host;
>> +	admin_t host = NULL;
>> 	int status;
>> 
>> 	status = EXIT_FAILURE;
>> diff --git a/src/fedfsc/fedfs-lookup-replication.c b/src/fedfsc/fedfs-lookup-replication.c
>> index e258f8b..70654f2 100644
>> --- a/src/fedfsc/fedfs-lookup-replication.c
>> +++ b/src/fedfsc/fedfs-lookup-replication.c
>> @@ -223,7 +223,7 @@ static FedFsStatus
>> fedfs_lookup_replication_host(const char *hostname, const char *nettype,
>> 		const char *security, char * const *path_array, int request)
>> {
>> -	admin_t host;
>> +	admin_t host = NULL;
>> 	int status;
>> 
>> 	status = EXIT_FAILURE;
>> diff --git a/src/fedfsc/fedfs-null.c b/src/fedfsc/fedfs-null.c
>> index 8e63b7d..0e42729 100644
>> --- a/src/fedfsc/fedfs-null.c
>> +++ b/src/fedfsc/fedfs-null.c
>> @@ -136,7 +136,7 @@ static int
>> fedfs_null_host(const char *hostname, const char *nettype,
>> 		const char *security)
>> {
>> -	admin_t host;
>> +	admin_t host = NULL;
>> 	int status;
>> 
>> 	status = EXIT_FAILURE;
>> diff --git a/src/fedfsc/fedfs-set-nsdb-params.c b/src/fedfsc/fedfs-set-nsdb-params.c
>> index 2ac3568..b914bb0 100644
>> --- a/src/fedfsc/fedfs-set-nsdb-params.c
>> +++ b/src/fedfsc/fedfs-set-nsdb-params.c
>> @@ -156,7 +156,7 @@ fedfs_set_nsdb_params_host(const char *hostname, const char *nettype,
>> 		const char *security, struct admin_nsdb *nsdb,
>> 		struct admin_cert *cert)
>> {
>> -	admin_t host;
>> +	admin_t host = NULL;
>> 	int status;
>> 
>> 	status = EXIT_FAILURE;
>> -- 
>> 1.8.4.2
> 
> --
> Chuck Lever
> chuck[dot]lever[at]oracle[dot]com
> 
> 
> 
> 
> _______________________________________________
> fedfs-utils-devel mailing list
> fedfs-utils-devel@oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/fedfs-utils-devel

--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com
diff mbox

Patch

diff --git a/src/fedfsc/fedfs-create-junction.c b/src/fedfsc/fedfs-create-junction.c
index 987c02a..b8dc817 100644
--- a/src/fedfsc/fedfs-create-junction.c
+++ b/src/fedfsc/fedfs-create-junction.c
@@ -153,7 +153,7 @@  fedfs_create_junction_host(const char *hostname, const char *nettype,
 		const char *security, char * const *path_array,
 		struct admin_fsn *fsn)
 {
-	admin_t host;
+	admin_t host = NULL;
 	int status;
 
 	status = EXIT_FAILURE;
diff --git a/src/fedfsc/fedfs-create-replication.c b/src/fedfsc/fedfs-create-replication.c
index 4effb2c..ecb446c 100644
--- a/src/fedfsc/fedfs-create-replication.c
+++ b/src/fedfsc/fedfs-create-replication.c
@@ -153,7 +153,7 @@  fedfs_create_replication_host(const char *hostname, const char *nettype,
 		const char *security, char * const *path_array,
 		struct admin_fsn *fsn)
 {
-	admin_t host;
+	admin_t host = NULL;
 	int status;
 
 	status = EXIT_FAILURE;
diff --git a/src/fedfsc/fedfs-delete-junction.c b/src/fedfsc/fedfs-delete-junction.c
index 97bd072..0b68a95 100644
--- a/src/fedfsc/fedfs-delete-junction.c
+++ b/src/fedfsc/fedfs-delete-junction.c
@@ -143,7 +143,7 @@  static int
 fedfs_delete_junction_host(const char *hostname, const char *nettype,
 		const char *security, char * const *path_array)
 {
-	admin_t host;
+	admin_t host = NULL;
 	int status;
 
 	status = EXIT_FAILURE;
diff --git a/src/fedfsc/fedfs-delete-replication.c b/src/fedfsc/fedfs-delete-replication.c
index aff44f6..d60e1db 100644
--- a/src/fedfsc/fedfs-delete-replication.c
+++ b/src/fedfsc/fedfs-delete-replication.c
@@ -143,7 +143,7 @@  static int
 fedfs_delete_replication_host(const char *hostname, const char *nettype,
 		const char *security, char * const *path_array)
 {
-	admin_t host;
+	admin_t host = NULL;
 	int status;
 
 	status = EXIT_FAILURE;
diff --git a/src/fedfsc/fedfs-get-limited-nsdb-params.c b/src/fedfsc/fedfs-get-limited-nsdb-params.c
index ec66d86..24e4e9b 100644
--- a/src/fedfsc/fedfs-get-limited-nsdb-params.c
+++ b/src/fedfsc/fedfs-get-limited-nsdb-params.c
@@ -170,7 +170,7 @@  static int
 fedfs_get_limited_nsdb_params_host(const char *hostname, const char *nettype,
 		const char *security, struct admin_nsdb *nsdb)
 {
-	admin_t host;
+	admin_t host = NULL;
 	int status;
 
 	status = EXIT_FAILURE;
diff --git a/src/fedfsc/fedfs-get-nsdb-params.c b/src/fedfsc/fedfs-get-nsdb-params.c
index 4bef1aa..bd6eef1 100644
--- a/src/fedfsc/fedfs-get-nsdb-params.c
+++ b/src/fedfsc/fedfs-get-nsdb-params.c
@@ -186,7 +186,7 @@  fedfs_get_nsdb_params_host(const char *hostname, const char *nettype,
 		const char *security, struct admin_nsdb *nsdb,
 		const char *certfile)
 {
-	admin_t host;
+	admin_t host = NULL;
 	int status;
 
 	status = EXIT_FAILURE;
diff --git a/src/fedfsc/fedfs-lookup-junction.c b/src/fedfsc/fedfs-lookup-junction.c
index b43a6ae..cfeb33e 100644
--- a/src/fedfsc/fedfs-lookup-junction.c
+++ b/src/fedfsc/fedfs-lookup-junction.c
@@ -222,7 +222,7 @@  static int
 fedfs_lookup_junction_host(const char *hostname, const char *nettype,
 		const char *security, char * const *path_array, int request)
 {
-	admin_t host;
+	admin_t host = NULL;
 	int status;
 
 	status = EXIT_FAILURE;
diff --git a/src/fedfsc/fedfs-lookup-replication.c b/src/fedfsc/fedfs-lookup-replication.c
index e258f8b..70654f2 100644
--- a/src/fedfsc/fedfs-lookup-replication.c
+++ b/src/fedfsc/fedfs-lookup-replication.c
@@ -223,7 +223,7 @@  static FedFsStatus
 fedfs_lookup_replication_host(const char *hostname, const char *nettype,
 		const char *security, char * const *path_array, int request)
 {
-	admin_t host;
+	admin_t host = NULL;
 	int status;
 
 	status = EXIT_FAILURE;
diff --git a/src/fedfsc/fedfs-null.c b/src/fedfsc/fedfs-null.c
index 8e63b7d..0e42729 100644
--- a/src/fedfsc/fedfs-null.c
+++ b/src/fedfsc/fedfs-null.c
@@ -136,7 +136,7 @@  static int
 fedfs_null_host(const char *hostname, const char *nettype,
 		const char *security)
 {
-	admin_t host;
+	admin_t host = NULL;
 	int status;
 
 	status = EXIT_FAILURE;
diff --git a/src/fedfsc/fedfs-set-nsdb-params.c b/src/fedfsc/fedfs-set-nsdb-params.c
index 2ac3568..b914bb0 100644
--- a/src/fedfsc/fedfs-set-nsdb-params.c
+++ b/src/fedfsc/fedfs-set-nsdb-params.c
@@ -156,7 +156,7 @@  fedfs_set_nsdb_params_host(const char *hostname, const char *nettype,
 		const char *security, struct admin_nsdb *nsdb,
 		struct admin_cert *cert)
 {
-	admin_t host;
+	admin_t host = NULL;
 	int status;
 
 	status = EXIT_FAILURE;