/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/* This is an example of the function regfree(regex_t).  This function frees
   any memory allocated to "reg".  
*/
#include <regex.h>
#include <stdio.h>
#include <sys/types.h>

int main() {
    regex_t reg;        
    int  cflags, retval;
    char  *pattern;
    pattern = "abcd";
    cflags = REG_NEWLINE; 
    retval = regcomp(&reg, pattern,cflags);
    regfree(&reg);
    printf("&reg has been freed of all memory.\n");
}

