diff --git a/apps/app_voicemail2.c b/apps/app_voicemail2.c
index 50cbd02703717beb93d5bdd6ac273026318c3c61..911763e1dfce4d83f2002f9c3c782485c1e60ee8 100755
--- a/apps/app_voicemail2.c
+++ b/apps/app_voicemail2.c
@@ -711,19 +711,19 @@ static int play_and_record(struct ast_channel *chan, char *playfile, char *recor
 			return -1;
 	}
 	
-	fmts = strdupa(fmt);
+	fmts = ast_strdupa(fmt);
 	
 	stringp=fmts;
 	strsep(&stringp, "|");
 	ast_log(LOG_DEBUG,"Recording Formats: sfmts=%s\n", fmts);	
-	sfmt[0] = strdupa(fmts);
+	sfmt[0] = ast_strdupa(fmts);
 	
 	while((fmt = strsep(&stringp, "|"))) {
 		if (fmtcnt > MAX_OTHER_FORMATS - 1) {
 			ast_log(LOG_WARNING, "Please increase MAX_OTHER_FORMATS in app_voicemail.c\n");
 			break;
 		}
-		sfmt[fmtcnt++] = strdupa(fmt);
+		sfmt[fmtcnt++] = ast_strdupa(fmt);
 	}
 
 	if (maxtime)