Remove strdup.

No need for explicit use of strdup + free, the refs will be cleaned up
with the handles.

Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
Cleaned up tabs and spacing for stylistic reasons.

Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>