report gamma setting to gamma method

Signed-off-by: Mattias Andrée <maandree@operamail.com>
Fix freeing of already freed memory

Signed-off-by: Mattias Andrée <maandree@operamail.com>