Re: [PATCH] 9p/cache.c: Fix memory leak in v9fs_cache_session_get_cookie

2019-05-22 Thread Dominique Martinet
Bharath Vedartham wrote on Thu, May 23, 2019: > v9fs_cache_session_get_cookie assigns a random cachetag to > v9ses->cachetag, if the cachetag is not assigned previously. > > v9fs_random_cachetag allocates memory to v9ses->cachetag with kmalloc > and uses scnprintf to fill it up with a cachetag. >

[PATCH] 9p/cache.c: Fix memory leak in v9fs_cache_session_get_cookie

2019-05-22 Thread Bharath Vedartham
v9fs_cache_session_get_cookie assigns a random cachetag to v9ses->cachetag, if the cachetag is not assigned previously. v9fs_random_cachetag allocates memory to v9ses->cachetag with kmalloc and uses scnprintf to fill it up with a cachetag. But if scnprintf fails, v9ses->cachetag is not freed in t