| 1 |
typedef __SIZE_TYPE__ size_t; |
| 2 |
|
| 3 |
extern size_t strlen (const char *__s) |
| 4 |
__attribute__ ((__nothrow__ , __leaf__)) |
| 5 |
__attribute__ ((__pure__)) |
| 6 |
__attribute__ ((__nonnull__ (1))); |
| 7 |
|
| 8 |
extern void *malloc (size_t __size) |
| 9 |
__attribute__ ((__nothrow__ , __leaf__)) |
| 10 |
__attribute__ ((__malloc__)) ; |
| 11 |
|
| 12 |
extern void free (void *__ptr) |
| 13 |
__attribute__ ((__nothrow__ , __leaf__)); |
| 14 |
|
| 15 |
typedef struct _krb5_data { |
| 16 |
unsigned int length; |
| 17 |
char *data; |
| 18 |
} krb5_data; |
| 19 |
|
| 20 |
typedef struct _krb5_error { |
| 21 |
krb5_data text; |
| 22 |
} krb5_error; |
| 23 |
|
| 24 |
extern const char *error_message (int); |
| 25 |
|
| 26 |
int |
| 27 |
recvauth_common (int problem) |
| 28 |
{ |
| 29 |
if (problem) { |
| 30 |
krb5_error error; |
| 31 |
const char *message = error_message(problem); |
| 32 |
error.text.length = strlen(message) + 1; |
| 33 |
if (!(error.text.data = (char *) malloc(error.text.length))) { |
| 34 |
goto cleanup; |
| 35 |
} |
| 36 |
free(error.text.data); |
| 37 |
} |
| 38 |
|
| 39 |
cleanup: |
| 40 |
return problem; /* { dg-bogus "leak" } */ |
| 41 |
} |