scst_get_unique_sess_name(): Handle out-of-memory properly

Return NULL instead of triggering a NULL pointer dereference if out
of memory. Detected by Coverity.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4656 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2012-12-20 02:20:24 +00:00
parent 47db473269
commit 5fe3432935

View File

@@ -6474,6 +6474,7 @@ restart:
PRINT_ERROR("Unable to allocate a "
"replacement name (size %d)",
len);
break;
}
}