Fixed leaking resource "var_value"

memory allocated to var_value is not freed at one of return places. It may cause memory leak.
Merge pull request #8 from ya1gaurav/patch-8

Fixed leaking resource "var_value"