diff --git a/apps/app_queue.c b/apps/app_queue.c
index 441eab0213adb1d7d01b439be74b99b1638df045..a6cf340be314ce578fe3297c04c7bb98d4bfb332 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -729,15 +729,15 @@ static void *device_state_thread(void *data)
 
 		handle_statechange(sc);
 
-		free(sc);
+		ast_free(sc);
 		sc = NULL;
 	}
 
 	if (sc)
-		free(sc);
+		ast_free(sc);
 
 	while ((sc = AST_LIST_REMOVE_HEAD(&device_state.state_change_q, entry)))
-		free(sc);
+		ast_free(sc);
 
 	return NULL;
 }
@@ -2829,7 +2829,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
 				break;
 		} else {
 			ao2_ref(cur, -1);
-			free(tmp);
+			ast_free(tmp);
 		}
 	}
 	if (qe->expire && (!qe->parent->timeout || (qe->expire - now) <= qe->parent->timeout))