[PATCH] sock: fix potential memory leak in proto_register()