diff options
author | Roland Dreier <rolandd@cisco.com> | 2006-03-20 10:08:25 -0800 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-03-20 10:08:25 -0800 |
commit | bf17c1c7cc9250d7c3c01b0ae898aefa1853535a (patch) | |
tree | 95c534eed9c2b188c28681a87690a759c876c30c /drivers | |
parent | 6b63e3015a69dd8aa5534e23af9f132a021da02e (diff) | |
download | op-kernel-dev-bf17c1c7cc9250d7c3c01b0ae898aefa1853535a.zip op-kernel-dev-bf17c1c7cc9250d7c3c01b0ae898aefa1853535a.tar.gz |
IB/srp: Coverity fix to srp_parse_options()
Fix leak found by Coverity: in the SRP_OPT_DGID case,
srp_parse_options() didn't free the result of match_strdup().
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/ulp/srp/ib_srp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 89ad29d..a13dcdf 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1448,6 +1448,7 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target) strlcpy(dgid, p + i * 2, 3); target->path.dgid.raw[i] = simple_strtoul(dgid, NULL, 16); } + kfree(p); break; case SRP_OPT_PKEY: |