Ensure NULL is not returned incorrectly after the first call.

I'm surprised this was not caught long ago, but previous the
code actually never did call the function twice so it was
missed.  Anyway, this fixes it.
This commit is contained in:
Brian Behlendorf 2010-06-21 21:26:25 -07:00
parent c153a79adc
commit 94f23a6856
1 changed files with 2 additions and 0 deletions

View File

@ -48,6 +48,8 @@ getexecname(void)
execname[rc] = '\0';
ptr = execname;
}
} else {
ptr = execname;
}
pthread_mutex_unlock(&mtx);