Fix bug in CPU memory allocation (#5017)
Fix bug in CPU memory allocation (#5017)

This bug will cause "Cannot Free space to a device you have not allocated"
when normalization parameter of SoftmaxOutput is "valid".
Guneet-Dhillon/mxnet,Guneet-Dhillon/mxnet,Guneet-Dhillon/mxnet,Guneet-Dhillon/mxnet,Guneet-Dhillon/mxnet,Guneet-Dhillon/mxnet,Guneet-Dhillon/mxnet,Guneet-Dhillon/mxnet,Guneet-Dhillon/mxnet