[LU-7413] out_read() may pass a NULL pointer to OBD_FREE() Created: 10/Nov/15  Updated: 12/Nov/15  Resolved: 12/Nov/15

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.8.0
Fix Version/s: Lustre 2.8.0

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: Di Wang
Resolution: Duplicate Votes: 0
Labels: easy

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

If we allocate rdbuf->rb_bufs[i] but fail to allocate rdbuf->rb_bufs[i]->lb_buf then we pass a NULL pointer to OBD_FREE().

        for (i = 0; i < nbufs; i++) {
                if (rdbuf->rb_bufs[i] != NULL) {
                        OBD_FREE(rdbuf->rb_bufs[i]->lb_buf,
                                 rdbuf->rb_bufs[i]->lb_len);
                        OBD_FREE_PTR(rdbuf->rb_bufs[i]);
                }
	}


 Comments   
Comment by Di Wang [ 12/Nov/15 ]

Will fix this issue together in LU-7414.

Generated at Sat Feb 10 02:08:41 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.