C function to find the less program
Clearer Naming Needed

In general, I think your variable naming could be better. I would rename less_token to be called path or something to make it clearer what you're doing here. new_str should be called current_path or curr_path. Moreover, I'd make the function name something more like find_less_program. 

C Style

If you're going to be changing the ret parameter, it's idiomatic in C to pass in a pointer to ret and modify that. Either that or remove ret as a parameter and just return an int as an error code. Moreover, whenever I see a break in a while loop, I get a small frown on my face as that's usually a sign of bad control flow. See below for (IMO) a better control flow.

Moreover, it's been over a decade since C99 came out and introduced us to the bool type definitions. Prefer using them over the standard int way of signaling true or false. You'll need to include stdbool.h to use bool.

I would also create a small constant buffer containing the name of the program we're looking for (in this case "/less".) This prevents you from having to write "/less" all over the place and instead just use a variable name. There's no need to assign the first character of the allocated buffer to NULL in this case. Just call strcpy to copy the string name into the buffer instead of relying on strcat. This also makes your intent clearer as you're first copying an existing string into a buffer and then appending to it.

Here's a possible implementation taking together all of the above suggestions:

bool find_less_program(char *path) {

    bool found = false;
    char *curr_path;
    const char program[] = "/less";

    while (path &amp;&amp; !found) {
        if ((curr_path = malloc(strlen(path) + sizeof(program))) != NULL) {

            strcpy(curr_path, path);
            strcat(curr_path, program);
            if (file_exist(curr_path)) {
                found = true; // we found the program
            }
            free(curr_path);
            path = strtok(NULL, ":");
        } else {
            fprintf(stderr, "malloc failed!\n");
            return false;
        }
    }
    return found;
}