diff --git a/src/app-layer-detect-proto.c b/src/app-layer-detect-proto.c index 6ef06d3083..cd4ad19f6c 100644 --- a/src/app-layer-detect-proto.c +++ b/src/app-layer-detect-proto.c @@ -1654,13 +1654,9 @@ void AppLayerProtoDetectRegisterProtocol(AppProto alproto, const char *alproto_n { SCEnter(); - if (alpd_ctx.alproto_names[alproto] != NULL) - goto end; - - alpd_ctx.alproto_names[alproto] = alproto_name; + if (alpd_ctx.alproto_names[alproto] == NULL) + alpd_ctx.alproto_names[alproto] = alproto_name; - goto end; - end: SCReturn; }