Fixes memory leaks in ol_prefix_match

Compiles & passes tests on FreeBSD 10