aboutsummaryrefslogtreecommitdiff
path: root/src/dstr/ft_dstrdestroy.c
blob: c76b6920b2cab60d4d4af4ac6b013dbb472088ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   ft_dstrdestroy.c                                   :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: charles <charles.cabergs@gmail.com>        +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2020/04/03 13:58:46 by charles           #+#    #+#             */
/*   Updated: 2020/04/04 19:51:28 by charles          ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#include "libft_dstr.h"

/*
** \brief       Destroy a dynamic string
** \param dstr  Dynamic string to destroy
*/

void		ft_dstrdestroy(t_ftdstr *dstr)
{
	if (dstr == NULL)
		return ;
	free(dstr->str);
	free(dstr);
}