[Bugs] [Bug 1625643] New: Use CALLOC in dht_layouts_init
bugzilla at redhat.com
bugzilla at redhat.com
Wed Sep 5 12:30:08 UTC 2018
https://bugzilla.redhat.com/show_bug.cgi?id=1625643
Bug ID: 1625643
Summary: Use CALLOC in dht_layouts_init
Product: GlusterFS
Version: mainline
Component: distribute
Assignee: bugs at gluster.org
Reporter: nbalacha at redhat.com
CC: bugs at gluster.org
Description of problem:
If dht_layouts_init fails, dht_init cleans it up by calling:
if (conf->file_layouts) {
for (i = 0; i < conf->subvolume_cnt; i++) {
GF_FREE (conf->file_layouts[i]);
}
GF_FREE (conf->file_layouts);
}
GF_FREE checks and frees non-null values. With malloc, we could end up with
random non-null values in the buffer which GF_FREE will attempt to free.
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1.
2.
3.
Actual results:
Expected results:
Additional info:
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the Bugs
mailing list