/*
S T R S A V E
=============

Saves string in dynamically allocated area of memory, independent of
call frame.

Copyright (c) 1994 by H. Schulzrinne
[29-Mar-1994]
*/
#include <stdlib.h>
#include <string.h>

char *strsave(char *s)
{
  char *p;

  if (!s) return 0;
  if ((p = (char *)malloc(strlen(s)+1)) != NULL) strcpy(p, s);
  return p;
} /* strsave */
