X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=enter.c;fp=enter.c;h=1b97bd439c201c1f9891909d99150c58574cef15;hp=cda61f2a5c454817ba982fa5649b95a98c7cc5fb;hb=b3cb6ed8d36c550a2e589910ce51bbc8352ff57c;hpb=8e037c67a88cb4680c4391134c578e3b55a80f8a diff --git a/enter.c b/enter.c index cda61f2..1b97bd4 100644 --- a/enter.c +++ b/enter.c @@ -151,7 +151,7 @@ static void replace_part (ENTER_STATE *state, size_t from, const char *buf) { /* Save the suffix */ size_t savelen = state->lastchar - state->curpos; - wchar_t *savebuf = mem_calloc (savelen, sizeof (wchar_t)); + wchar_t *savebuf = p_new(wchar_t, savelen); memcpy (savebuf, state->wbuf + state->curpos, savelen * sizeof (wchar_t)); @@ -638,7 +638,7 @@ int _mutt_enter_string (char *buf, size_t buflen, int y, int x, char **tfiles; *numfiles = 1; - tfiles = mem_calloc (*numfiles, sizeof (char *)); + tfiles = p_new(char *, *numfiles); mutt_expand_path (buf, buflen); tfiles[0] = str_dup (buf); *files = tfiles;