Only free(origin) when we are done using it.

origin is used in:

char *str = rasprintf("file=%s, request=%s", origin, hostname);

Free it afterwards :).