X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=libcfs%2Flibcfs%2Fhash.c;fp=libcfs%2Flibcfs%2Fhash.c;h=b69f638bc4eab9143e1ef8acfe9eb74d341c929a;hb=718e3f3e680f422d865a15890ac60e66dcd9e240;hp=34da19db72f535ecb949e5f6dcc7660a025936fd;hpb=aa76ae0c21a7e315ecb1fded82f2c793aa26f78c;p=fs%2Flustre-release.git diff --git a/libcfs/libcfs/hash.c b/libcfs/libcfs/hash.c index 34da19d..b69f638 100644 --- a/libcfs/libcfs/hash.c +++ b/libcfs/libcfs/hash.c @@ -1064,7 +1064,7 @@ cfs_hash_create(char *name, unsigned cur_bits, unsigned max_bits, len = (flags & CFS_HASH_BIGNAME) == 0 ? CFS_HASH_NAME_LEN : CFS_HASH_BIGNAME_LEN; - LIBCFS_ALLOC(hs, offsetof(struct cfs_hash, hs_name[len])); + LIBCFS_ALLOC(hs, sizeof(struct cfs_hash) + len); if (hs == NULL) RETURN(NULL);