io-stats : null dereference coverity fix.
CID :1124502 Change-Id: I2911be340e8e48a52e951d0f04f6a96f3c219fab BUG: 789278 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/9659 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
This commit is contained in:
parent
d680cbb47a
commit
49d68945c0
@ -481,11 +481,13 @@ ios_stat_add_to_list (struct ios_stat_head *list_head, uint64_t value,
|
||||
new->value = value;
|
||||
ios_stat_ref (iosstat);
|
||||
list_add_tail (&new->list, &tmp->list);
|
||||
stat = last->iosstat;
|
||||
last->iosstat = NULL;
|
||||
ios_stat_unref (stat);
|
||||
list_del (&last->list);
|
||||
GF_FREE (last);
|
||||
if (last) {
|
||||
stat = last->iosstat;
|
||||
last->iosstat = NULL;
|
||||
ios_stat_unref (stat);
|
||||
list_del (&last->list);
|
||||
GF_FREE (last);
|
||||
}
|
||||
if (reposition == MAX_LIST_MEMBERS)
|
||||
list_head->min_cnt = value;
|
||||
else if (min_count) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user