Fixed mcrypt and malloc