From 3c755f0a4dc0b555fcb439a8b18d8e45d5213a4c Mon Sep 17 00:00:00 2001 From: Danny Auble <da@schedmd.com> Date: Tue, 12 May 2015 14:15:53 -0700 Subject: [PATCH] Make sure what is returned is none a blank string from function. --- src/plugins/accounting_storage/mysql/as_mysql_job.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/accounting_storage/mysql/as_mysql_job.c b/src/plugins/accounting_storage/mysql/as_mysql_job.c index 28f110d0b44..e70bd28d915 100644 --- a/src/plugins/accounting_storage/mysql/as_mysql_job.c +++ b/src/plugins/accounting_storage/mysql/as_mysql_job.c @@ -113,7 +113,7 @@ static char *_get_user_from_associd(mysql_conn_t *mysql_conn, } xfree(query); - if ((row = mysql_fetch_row(result))) + if ((row = mysql_fetch_row(result)) && row[0][0]) user = xstrdup(row[0]); mysql_free_result(result); -- GitLab