mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
scst_local: Fix scst_local_add_target() error path
Do not return a pointer to freed memory in *out_tgt. Detected by Coverity. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6343 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1968,10 +1968,10 @@ static int scst_local_add_target(const char *target_name,
|
||||
|
||||
res = 0;
|
||||
|
||||
out:
|
||||
if (out_tgt != NULL)
|
||||
*out_tgt = tgt;
|
||||
|
||||
out:
|
||||
TRACE_EXIT_RES(res);
|
||||
return res;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user