- Moved the NULL check after memory allocation to occur before the memset call.
This prevents potential undefined behavior if the allocation fails.
- Ensures safe memory handling and avoids crashes due to dereferencing NULL.
Signed-off-by: CMT-Ashish <ashish.macwan@comminent.com>
Signed-off-by: ashishmac7 <ashishmac777@gmail.com>