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:
parent
c153a79adc
commit
94f23a6856
|
@ -48,6 +48,8 @@ getexecname(void)
|
|||
execname[rc] = '\0';
|
||||
ptr = execname;
|
||||
}
|
||||
} else {
|
||||
ptr = execname;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&mtx);
|
||||
|
|
Loading…
Reference in New Issue