Bug fixed #1: Wrong allocation of memory.

Signed-off-by: Utkarsh Jaiswal <ujaiswal.iit@gmail.com>