Back to index

php5  5.3.10
Functions
zip_memdup.c File Reference
#include <stdlib.h>
#include <string.h>
#include "zipint.h"

Go to the source code of this file.

Functions

void * _zip_memdup (const void *mem, size_t len, struct zip_error *error)

Function Documentation

void* _zip_memdup ( const void *  mem,
size_t  len,
struct zip_error error 
)

Definition at line 42 of file zip_memdup.c.

{
    void *ret;

    ret = malloc(len);
    if (!ret) {
       _zip_error_set(error, ZIP_ER_MEMORY, 0);
       return NULL;
    }

    memcpy(ret, mem, len);

    return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function: