[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: replace alloca with strdup
From: |
Richard Stallman |
Subject: |
Re: replace alloca with strdup |
Date: |
Sun, 22 May 2005 05:15:56 -0400 |
While looking at some compilerwarnings I found an alloca and an
strcpy.
What is wrong with that? I don't see any problem in it.
And I realized this can also be done as follows:
+ if ((error_msg = strdup(error_message)) == NULL)
+ errx(1, "Out of memory.");
This creates a memory leak.