In register_name, before locking the var_names array, we check the variable name
validity. So if we try to register an invalid or empty name, we need to return
without unlocking it (because it was never locked).
This patch must be backported in 1.8.
/* Check length. */
if (len == 0) {
memprintf(err, "Empty variable name cannot be accepted");
- res = NULL;
- goto end;
+ return res;
}
/* Check scope. */
else {
memprintf(err, "invalid variable name '%s'. A variable name must be start by its scope. "
"The scope can be 'proc', 'sess', 'txn', 'req' or 'res'", name);
- res = NULL;
- goto end;
+ return res;
}
if (alloc)