libs/uvl: fix some memory wasting