diff --git a/translate.c b/translate.c
index f6b0f2cdac6bbe5edce80353dcfe1c05f497b2d7..7884360235166d3585b283ae8523c0a7c4662d4c 100755
--- a/translate.c
+++ b/translate.c
@@ -108,6 +108,7 @@ struct ast_trans_pvt *ast_translator_build_path(int dest, int source)
 				if (!tmp->state) {
 					free(tmp);
 					tmp = NULL;
+					return NULL;
 				}
 				/* Set the root, if it doesn't exist yet... */
 				if (!tmpr)