Fix compiler warning.
authorRichard Mudgett <rmudgett@digium.com>
Thu, 6 Jun 2013 20:50:25 +0000 (20:50 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 6 Jun 2013 20:50:25 +0000 (20:50 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390734 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/stasis_message_router.c

index 4e7bbb5..4409d22 100644 (file)
@@ -208,8 +208,8 @@ static struct stasis_message_route *route_create(
 static int add_route(struct stasis_message_router *router,
                     struct stasis_message_route *route)
 {
-       SCOPED_AO2LOCK(lock, router);
        RAII_VAR(struct stasis_message_route *, existing_route, NULL, ao2_cleanup);
+       SCOPED_AO2LOCK(lock, router);
 
        if ((existing_route = find_route(router, route->message_type))) {
                return -1;